Find answers from the community

Updated 4 months ago

Templates

At a glance
yes! i found the notebook but previously, GPTSimpleVectorIndex used to have a QA template which has now moved to GPTSimpleVectorIndex with multi-step query combiner... so i'm curious about the motivation behind this πŸ˜…
L
a
11 comments
Oh the template is still there!
oh yeah?? would be great if you already know where I can find the template. i'm a bit lost. llama-index has grown at an insane speed
Are you looking for the actual template itself, or how to customize/pass it in?
but would be better to see what the actual template is.
The prompts are here: https://github.com/jerryjliu/llama_index/blob/main/gpt_index/prompts/default_prompts.py

And chatgpt specific prompts here: https://github.com/jerryjliu/llama_index/blob/main/gpt_index/prompts/chat_prompts.py

You can follow that to create your own, and pass them in at query time

index.query(..., text_qa_template=my_template, refine_template=my_refine_template)
thanks! i'll try this out! πŸ™
okay... so looks like the default_qa_template is used by GPTVectorStoreIndexQuery which is in turn used by GPTVectorStoreIndex. It's a bit complex but I think I get it now.
Yea there's a lot of nested stuff happening haha but sounds like you are getting it πŸ‘
yes! thanks a lot for the assist 🀝
Add a reply
Sign up and join the conversation on Discord