Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research Mode [Part 2]: Improve Prompts, Edit Chat Messages. Set LLM Seed for Reproducibility #954

Merged
merged 36 commits into from
Nov 2, 2024

Conversation

debanjum
Copy link
Member

@debanjum debanjum commented Nov 1, 2024

  • Improve chat actors and their prompts for research mode.
  • Add documentation to enable the code tool when self-hosting Khoj
  • Edit Chat Messages
    • Store Turn Id in each chat message.
    • Expose API to delete chat message.
    • Expose delete chat message button to turn delete chat message from web app
  • Set LLM Generation Seed for Reproducible Debugging and Testing
    • Setting seed for LLM generation is supported by Llama.cpp and OpenAI models.
      This can (somewhat) restrain LLM output
    • Getting fixed responses for fixed inputs helps test, debug longer reasoning chains like used in advanced reasoning

debanjum and others added 30 commits October 30, 2024 14:00
Capability exists but idea needs to be investigated further
- Allow server to start if loading embedding model fails with an error.
  This allows fixing the embedding model config via admin panel.

  Previously server failed to start if embedding model was configured
  incorrectly. This prevented fixing the model config via admin panel.

- Convert boolean string in config json to actual booleans when passed
  via admin panel as json before passing to model, query configs

- Only create default model if no search model configured by admin.
  Return first created search model if its been configured by admin.
Anthropic models do not support seed. But offline, gemini and openai
models do. Use these to debug and test Khoj via KHOJ_LLM_SEED env var
Each chat turn is a user query, khoj response message pair
- Match the online query generator prompt to match the formatting of
  extract questions
- Separate iteration results by newline
- Improve webpage and online tool descriptions
…ies that were not with selected tool when going through tool selection iterations
@debanjum debanjum force-pushed the improve-debug-reasoning-and-other-misc-fixes branch from fbc753c to 14e4530 Compare November 2, 2024 01:12
@debanjum debanjum merged commit cff8e02 into master Nov 2, 2024
8 of 9 checks passed
@debanjum debanjum deleted the improve-debug-reasoning-and-other-misc-fixes branch November 2, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants