We are using GPTSimpleVectorIndex to index the data and employing LLMPredictor along with GPTSimpleVectorIndex to retrieve responses from the indexed datasets. Our goal is to exclusively obtain the trained responses from the vector database using the OpenAI model ‘text-davinci-003’. To achieve this, we have included the instruction ‘Match and display only the trained response.’ However, we have encountered a situation where the model occasionally generates its own responses or continues to provide responses from the LLM, despite the added instructions. What steps can we take to resolve this issue, and what best practices should we follow to meet our requirements?
Hi and welcome to the Developer Forum!
Do you mean GPTVectorStoreIndex from llama_index?
You would probably be better asking this on llama_index’s discord here LlamaIndex 🦙(GPT Index)
gpt-3.5-turbo-instruct has just been previewed today as the replacement for text-davinci-003, with its own training and significantly-updated fine-tuning on instruction following. It might be worth dropping this in as the model name for your existing project, and besides decimating your costs (literally), seeing how it performs on the same tasks instructed.
On the prompting front: “when receiving an injected document with response format, you are only to answer based on the provided text, and not use pretrained AI knowledge to further infer an answer.” Or instead you might not phrase it as “you”, but instead prompt as “the AI will successfully only answer”
Although it seems like if the vector database return was sufficient, you could almost cut out the AI middleman.
I’ve joined their discord to let them know I’m going to start sending these types of queries to them, I’ll also see if I can make some time to learn their framework, looks promising.
Yes, we are using the Llama Index (formerly GPT Index).