Closed ThomasVitale closed 1 week ago
Just some general thoughts, not necessary to resolve for this PR.
QueryAugmentor extends BiFunction<Query, RetrievalContext, Query>
where RetrievalContext
is
public class RetrievalContext {
private final List<Document> documents;
private final Map<String, Object> metadata;
...
this way additional information that can be used by an implementing class can be taken into account. The document is the core part, but there could be additional information to influence how the query gets augmented. Perhaps that would be passed in the constrcutor to the QueryAugmentor impl. Just looking to move away from types that don't have extensibility in the interface.
RetrievedDocuments
that contains the list plus additional data about those documents? I get test failures for tests org.springframework.ai.integration.tests
due to the api-key not being set. Prob works in your environment but in my I don't have any spring.ai.openai.*
properties set.
merged in 263fe2fba7b6e940ac802e996db474d8909fe5d2
Query Analysis
Improvements
Tests
Relates to #gh-1603