[GH-ISSUE #1455] [FEAT]: Add option to have LLM rephrase user question before querying vector store #928

Closed
opened 2026-02-22 18:22:14 -05:00 by yindo · 2 comments
Owner

Originally created by @atljoseph on GitHub (May 19, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1455

What would you like to see?

When an LLM rephrases a user’s question, it often leads to better vector matches. Please add a setting to make this an option, including a prompt template. I guess maybe it’d be good to search by BOTH the user’s initial request AND the LLM’s rephrased question. This would be relatively easy to put in, but it might slow down initial response time for some, if only slightly.

Can you do the same with hallucination detection and mitigation. Again. User would encounter a perceived performance hit if they weren’t aware of what was going on underneath.

Would be a trade off of performance and utility.

Originally created by @atljoseph on GitHub (May 19, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1455 ### What would you like to see? When an LLM rephrases a user’s question, it often leads to better vector matches. Please add a setting to make this an option, including a prompt template. I guess maybe it’d be good to search by BOTH the user’s initial request AND the LLM’s rephrased question. This would be relatively easy to put in, but it might slow down initial response time for some, if only slightly. Can you do the same with hallucination detection and mitigation. Again. User would encounter a perceived performance hit if they weren’t aware of what was going on underneath. Would be a trade off of performance and utility.
yindo added the enhancementfeature request labels 2026-02-22 18:22:14 -05:00
yindo closed this issue 2026-02-22 18:22:14 -05:00
Author
Owner

@timothycarambat commented on GitHub (May 19, 2024):

There are far faster ways to improve retrieval and accuracy over doing this. You would be surprised, but doing this would be quite high latency and result in minimal gains. Eventually, what ends up happening is you have re-built a Reranking model (https://github.com/Mintplex-Labs/anything-llm/issues/1124) because that is what those solve and is the logical conclusion of following this path!

Improvements we will add that can be done far prior to resorting to this:

@timothycarambat commented on GitHub (May 19, 2024): There are far faster ways to improve retrieval and accuracy over doing this. You would be surprised, but doing this would be quite high latency and result in minimal gains. Eventually, what ends up happening is you have re-built a Reranking model (https://github.com/Mintplex-Labs/anything-llm/issues/1124) because that is what those solve and is the logical conclusion of following this path! Improvements we will add that can be done far prior to resorting to this: - Include sources from previous chats in history - Knowledge Graphs (https://github.com/Mintplex-Labs/anything-llm/tree/knowledge-graph-support) - Reranker support
Author
Owner

@atljoseph commented on GitHub (May 19, 2024):

All behind what you mentioned!

On Sun, May 19, 2024 at 1:40 PM Timothy Carambat @.***>
wrote:

There are far faster ways to improve retrieval and accuracy over doing
this. You would be surprised, but doing this would be quite high latency
and result in minimal gains. Eventually, what ends up happening is you have
re-built a Reranking model (#1124
https://github.com/Mintplex-Labs/anything-llm/issues/1124) because that
is what those solve and is the logical conclusion of following this path!

Improvements we will add that can be done far prior to resorting to this:


Reply to this email directly, view it on GitHub
https://github.com/Mintplex-Labs/anything-llm/issues/1455#issuecomment-2119310186,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF632FJMH5I7PFOPE6CQMADZDDPYJAVCNFSM6AAAAABH6DXLZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGMYTAMJYGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

@atljoseph commented on GitHub (May 19, 2024): All behind what you mentioned! On Sun, May 19, 2024 at 1:40 PM Timothy Carambat ***@***.***> wrote: > There are far faster ways to improve retrieval and accuracy over doing > this. You would be surprised, but doing this would be quite high latency > and result in minimal gains. Eventually, what ends up happening is you have > re-built a Reranking model (#1124 > <https://github.com/Mintplex-Labs/anything-llm/issues/1124>) because that > is what those solve and is the logical conclusion of following this path! > > Improvements we will add that can be done far prior to resorting to this: > > - Include sources from previous chats in history > - Knowledge Graphs ( > https://github.com/Mintplex-Labs/anything-llm/tree/knowledge-graph-support > ) > - Reranker support > > — > Reply to this email directly, view it on GitHub > <https://github.com/Mintplex-Labs/anything-llm/issues/1455#issuecomment-2119310186>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AF632FJMH5I7PFOPE6CQMADZDDPYJAVCNFSM6AAAAABH6DXLZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGMYTAMJYGY> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
yindo changed title from [FEAT]: Add option to have LLM rephrase user question before querying vector store to [GH-ISSUE #1455] [FEAT]: Add option to have LLM rephrase user question before querying vector store 2026-06-05 14:38:00 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#928