Find answers from the community

s
F
Y
a
P
Updated last year

Terminate

How do I terminate the processing and respond with custom response if there are no matching nodes in vector db. Currently it still makes call to LLM and gets some out of context response. Are there any hooks / node post processor I can inject ?
L
1 comment
Hmmm. You'd have to separate out the retrieval and synthesis steps.

See here. Instead of constructing the query engine object, you can run the retriever, pass the nodes to a node postprocessor (if any), and then pass to a response synthesizer


https://gpt-index.readthedocs.io/en/stable/end_to_end_tutorials/usage_pattern.html#low-level-api
Add a reply
Sign up and join the conversation on Discord