mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
3e17ab438a
Overview --- - Put context into separate user message before sending to chat model. This should improve model response quality and truncation logic in code - Pass online context from chat history to chat model for response. This should improve response speed when previous online context can be reused - Improve format of notes, online context passed to chat models in prompt. This should improve model response quality Details --- The document, online search context are now passed as separate user messages to chat model, instead of being added to the final user message. This will improve - Models ability to differentiate data from user query. That should improve response quality and reduce prompt injection probability - Make truncation logic simpler and more robust When context window hit, can simply pop messages to auto truncate context in order of context, user, assistant message for each conversation turn in history until reach current user query The complex, brittle logic to extract user query from context in last user message isn't required. |
||
---|---|---|
.. | ||
data | ||
__init__.py | ||
conftest.py | ||
helpers.py | ||
test_agents.py | ||
test_cli.py | ||
test_client.py | ||
test_conversation_utils.py | ||
test_date_filter.py | ||
test_db_lock.py | ||
test_docx_to_entries.py | ||
test_file_filter.py | ||
test_helpers.py | ||
test_image_to_entries.py | ||
test_markdown_to_entries.py | ||
test_multiple_users.py | ||
test_offline_chat_actors.py | ||
test_offline_chat_director.py | ||
test_openai_chat_actors.py | ||
test_openai_chat_director.py | ||
test_org_to_entries.py | ||
test_orgnode.py | ||
test_pdf_to_entries.py | ||
test_plaintext_to_entries.py | ||
test_text_search.py | ||
test_word_filter.py |