voxel51 / voxelgpt

AI assistant that can query visual datasets, search the FiftyOne docs, and answer general computer vision questions
https://gpt.fiftyone.ai
Apache License 2.0
234 stars 17 forks source link

[FEATURE] Query Intent Classification #63

Closed jacobmarks closed 1 year ago

jacobmarks commented 1 year ago

Previously, we were passing in as many examples as we could within the constraints of context length, but it still wasn't good enough, which is why I tried splitting the intent determination up into two parts: first - is it a display query, and second - is it a CV or Docs query..

But that still wasn't good enough.

To overcome this, I've refactored so that we are doing similar example selection for the query intent examples we feed in to the intent classification model. I added a bunch more examples based on the FO docs, and had ChatGPT come up with some CV/ML examples as well.

The query_intent_examples.csv file only contains examples for documentation, computer vision, and invalid, and then we pull in and reuse our viewstage examples, labeling them with intent display.

Anecdotally, this results in much better intent classification. Plus, it cuts down on the potential number of distinct calls to the LLM.