Find answers from the community

Updated 11 months ago

Is it possible to only allow responses

Is it possible to only allow responses from the LLM with information from the retrieved nodes using LlamaIndex, thus restricting the LLM from responding to general questions that are not in the data sources?
T
1 comment
You can modify the prompt templates to be more restrictive. By default the template does try to limit answers only to the retrieved context but sometimes you might need to make it more explicit if you're experiencing it still: https://docs.llamaindex.ai/en/stable/module_guides/models/prompts.html
Add a reply
Sign up and join the conversation on Discord