RL based Query Rewriting

Examples

Real queries, real ranks

The rank of the correct function among all functions with BM25 (1 is best). These four are picked by hand from rule based lists, so treat them as illustrations. The browser below holds every test query.

Win
Originalhow to check if a path is writeable python77
Prompted 3Bhow to check if a path is writeable in Python94
Trained (combined)check if path is writeable - os.access3
Win
Originalpython sklearn onehotencoder string values943
Prompted 3Bpython sklearn onehotencoder string values encode136
Trained (combined)sklearn OneHotEncoder string values1
Repair
Originalpython substring index of1
Prompted 3Bpython string find406
Trained (combined)substring index of index1
Loss
Originalpython default menuitem select2
Prompted 3Bpython tkinter menuitem select3
Trained (combined)default menuitem select select_menu_item48

Browse all 1,500 test queries

Loading…

Win: the combined model puts the correct function in the top 3 while the original query and the prompted 3B both miss the top 10. Repair: the original was in the top 10, prompting lost it, training brought it back to the top 3. Loss: the original was in the top 3, the trained model misses the top 10.