mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
b351cfb8a0
Merge pull request #189 from debanjum/add-search-actor-to-improve-notes-lookup-for-chat ### Introduce Search Actor Search actor infers Search Queries from user's message - Capabilities - Use previous messages to add context to current search queries[^1] This improves quality of responses in multi-turn conversations. - Deconstruct users message into multiple search queries to lookup notes[^2] - Use relative date awareness to add date filters to search queries[^3] - Chat Director now does the following: 1. [*NEW*] Use Search Actor to generate search queries from user's message 2. Retrieve relevant notes from Knowledge Base using the Search queries 3. Pass retrieved relevant notes to Chat Actor to respond to user ### Add Chat Quality Tests - Test Search Actor capabilities - Mark Chat Director Tests for Relative Date, Multiple Search Queries as Expected Pass ### Give More Search Results as Context to Chat Actor - Loosen search results score threshold to work better for searches with date filters - Pass more search results (up to 5 from 2) as context to Chat Actor to improve inference [^1]: Multi-Turn Example Q: "When did I go to Mars?" Search: "When did I go to Mars?" A: "You went to Mars in the future" Q: "How was that experience?" Search: "How my Mars experience?" *This gives better context for the Chat actor to respond* [^2]: Deconstruct Example: Is Alpha older than Beta? => What is Alpha's age? & When was Beta born? [^3]: Date Example: Convert user messages containing relative dates like last month, yesterday to date filters on specific dates like dt>="2023-03-01" |
||
---|---|---|
.. | ||
data | ||
__init__.py | ||
conftest.py | ||
test_beancount_to_jsonl.py | ||
test_chat_actors.py | ||
test_chat_director.py | ||
test_cli.py | ||
test_client.py | ||
test_date_filter.py | ||
test_file_filter.py | ||
test_helpers.py | ||
test_image_search.py | ||
test_jsonl_to_jsonl.py | ||
test_markdown_to_jsonl.py | ||
test_org_to_jsonl.py | ||
test_orgnode.py | ||
test_rawconfig.py | ||
test_text_search.py | ||
test_word_filter.py |