Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract filter instructions from query #13

Closed
PGijsbers opened this issue Jul 5, 2024 · 5 comments
Closed

Extract filter instructions from query #13

PGijsbers opened this issue Jul 5, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@PGijsbers
Copy link
Member

Extend the pipeline to explicitly extract filter instructions from the natural language prompt.
For example:

"Give me small datasets that have data on flowers."

could translate to "Give flower datasets" and use filters "fewer than 10k rows" and "fewer than 10 features".
The first would continue to the RAG pipeline, and the second two filters would be applied on the returned results and shown directly in the web UI.

@PGijsbers PGijsbers added the enhancement New feature or request label Jul 5, 2024
@PGijsbers PGijsbers added this to the Filters milestone Jul 5, 2024
@PGijsbers
Copy link
Member Author

@SubhadityaMukherjee and @Taniya-Das will both explore this work. Subha will focus more on post-hoc filtering, and Taniya on bringing the filters to a database level. Both have strengths and weaknesses, and we want to explore a little bit their effects in practice.

@SubhadityaMukherjee
Copy link
Collaborator

As an update, initial post-hoc filtering was added for some filters. UI and further improvements still to be done.

@PGijsbers
Copy link
Member Author

@Taniya-Das has also created a flow where filters are extracted in a way that these filters may be applied at the database level. She will try to integrate it with the current tool.

@Taniya-Das
Copy link
Collaborator

The structuring-query script can be found in this branch - https://github.com/openml-labs/ai_search/tree/feature/structuring_query
A user query is decomposed into two parts - the search part + structured filter part.

Example -
A user query,
"query": "Find a mushroom dataset with less than 10k size"
would be structured as,
Search Query: mushroom dataset
Filter(s): comparator=<Comparator.LT: 'lt'> attribute='NumberOfInstances' value=10000

the structured filters can then be translated into the appropriate format.

@PGijsbers
Copy link
Member Author

PGijsbers commented Jul 25, 2024

@Taniya-Das I think we have working prototypes now, so perhaps we should close this issue. Actually integrating this with the app is captured in other issues #27 #26 as is evaluation #15 #18 and further working on improving things #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants