You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Query object originalQuery in RetrievalAugmentationAdvisor only includes text and history fields. I wish to add context into originalQuery. By adding context support, downstream transformers and retrievers would be able to access more runtime information to enhance their processing capabilities.
RetrievalAugmentationAdvisor
public AdvisedRequest before(AdvisedRequest request) {
Map<String, Object> context = new HashMap<>(request.adviseContext());
// 0. Create a query from the user text, parameters, and conversation history.
Query originalQuery = Query.builder()
.text(new PromptTemplate(request.userText(), request.userParams()).render())
.history(request.messages())
.build();
// 1. Transform original user query based on a chain of query transformers.
Query transformedQuery = originalQuery;
for (var queryTransformer : this.queryTransformers) {
transformedQuery = queryTransformer.apply(transformedQuery);
}
...
}
The text was updated successfully, but these errors were encountered:
Currently, the Query object originalQuery in
RetrievalAugmentationAdvisor
only includestext
andhistory
fields. I wish to add context into originalQuery. By adding context support, downstream transformers and retrievers would be able to access more runtime information to enhance their processing capabilities.The text was updated successfully, but these errors were encountered: