This PR enhances the view chunking process to include historical queries, improving the context for follow-up questions in the AI service.
Key Changes
Renamed ViewConverter to ViewChunker for clarity.
Updated ViewChunker to include historical queries in the content:
Now combines historical_queries with the current question.
Example JSON configuration:
{
"views": [
{
"name": "book",
"statement": "SELECT * FROM book where created_at = 2020",
"properties": {
"question": "in 2020",
"summary": "Retrieve the number of books in 2020",
"viewId": "fake-id-1",
"historical_queries": [
"Retrieve the number of books"
]
}
}
]
}
Modified AskService to use a combined query for retrieval:
Includes history summary and current query when available.
Refactored Indexing class to use a component dictionary for better organization.
Updated tests to reflect these changes and added new tests for historical queries.
Impact
These changes will improve the AI's ability to understand and respond to follow-up questions by providing more context from previous interactions. This should lead to more accurate and relevant responses to retrieve the saved view.
Screenshots
saved view includes the historical query's summary
run a follow-up query that based on a similar query to validate
Description
This PR enhances the view chunking process to include historical queries, improving the context for follow-up questions in the AI service.
Key Changes
ViewConverter
toViewChunker
for clarity.ViewChunker
to include historical queries in the content:historical_queries
with the current question.AskService
to use a combined query for retrieval:Indexing
class to use a component dictionary for better organization.Impact
These changes will improve the AI's ability to understand and respond to follow-up questions by providing more context from previous interactions. This should lead to more accurate and relevant responses to retrieve the saved view.
Screenshots
saved view includes the historical query's summary
run a follow-up query that based on a similar query to validate