arbs-io / vscode-openai

vscode-openai seamlessly incorporates OpenAI features into VSCode, providing integration with SCM, Code Editor and Chat.
https://marketplace.visualstudio.com/items?itemName=AndrewButson.vscode-openai
MIT License
75 stars 18 forks source link

Query Resource not working #239

Closed evershade closed 5 months ago

evershade commented 5 months ago

I'm trying to use the query resource functionality on my indexed files but it keeps responding with only "That's not a valid question."

I've tried asking the most basic of questions about my README.md, like "What's the name of the module?"

Here's my setup:

I see no errors in the VS code logs and can see the token usage in Azure, for prompts, embedding and completion. I can even see the token generation of gpt4 at a count of 7, which matches the phrase "That's not a valid question."

arbs-io commented 5 months ago

Hi @evershade The query resource uses RAG.

This means the queries match the context of the source. So, if you use generic questions like "What's the name of the module?" They will fail to match and have no context. It's designed to work over large sets of text, for example, loading all your books/PDFs about microservices and asking, "What are the main benefits of a microservice architecture?" The query would rack against the context, and they are both sent to gpt to answer the question.

You should copy the readme into chat and ask a question for the use case above. They provide the full context and the query so the model can determine an appropriate answer.