This PR adds an experimental feature under the experimentalNoodle flag to rewrite the queries based on the chat history (last 3 interactions) and the mentioned context items before sending it for enhanced context fetching; assuming it would improve the performance of the context search.
This is similar to the keyword expansion integrated with symf search right now, but it performs the rewrite based on the chat history as well as the mentioned context items, unlike the keyword expansion which treats the query in isolation.
The formal evaluation of this technique has not been done yet but it is the next step.
Until we have evaluated that the rewrite boosts the performance of the context retrieval, we will keep the rewrite step behind the experimental flag.
Test plan
A few examples are (the rewritten query manually pasted in the input box while debugging):
closes: https://linear.app/sourcegraph/issue/CODY-2272/rewrite-query-including-content-of-mention-before-sending-to-context
This PR adds an experimental feature under the
experimentalNoodle
flag to rewrite the queries based on the chat history (last 3 interactions) and the mentioned context items before sending it for enhanced context fetching; assuming it would improve the performance of the context search.This is similar to the keyword expansion integrated with symf search right now, but it performs the rewrite based on the chat history as well as the mentioned context items, unlike the keyword expansion which treats the query in isolation.
The formal evaluation of this technique has not been done yet but it is the next step.
Until we have evaluated that the rewrite boosts the performance of the context retrieval, we will keep the rewrite step behind the experimental flag.
Test plan
A few examples are (the rewritten query manually pasted in the input box while debugging):