mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Pull out query filters as top level documentation page
- Note perf eval from 2022 - Update links to query-filters in docs - Fix links - Update image model docs
This commit is contained in:
@@ -114,7 +114,7 @@ This feature finds entries similar to the one you are currently on.
|
||||
2. Hit `C-c s f` (or `M-x khoj RET f`) to find similar entries
|
||||
|
||||
### Advanced Usage
|
||||
- Add [query filters](/miscellaneous/advanced#query-filters) during search to narrow down results further
|
||||
- Add [query filters](/miscellaneous/query-filters) during search to narrow down results further
|
||||
e.g. `What is the meaning of life? -"god" +"none" dt>"last week"`
|
||||
|
||||
- Use `C-c C-o 2` to open the current result at cursor in its source org file
|
||||
|
||||
@@ -48,7 +48,7 @@ To see other notes similar to the current one, run *Khoj: Find Similar Notes* fr
|
||||
### Search
|
||||
Run *Khoj: Search* from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
|
||||
|
||||
See [Khoj Search](/features/search) for more details. Use [query filters](/miscellaneous/advanced#query-filters) to limit entries to search
|
||||
See [Khoj Search](/features/search) for more details. Use [query filters](/miscellaneous/query-filters) to limit entries to search
|
||||
|
||||
[search_demo](https://user-images.githubusercontent.com/6413477/218801155-cd67e8b4-a770-404a-8179-d6b61caa0f93.mp4 ':include :type=mp4')
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@ Go to https://app.khoj.dev/settings to connect your Notion workspace(s) to Khoj.
|
||||
4. In the first step, you generated an API key. Use the newly generated API Key in your Khoj settings, by default at [http://localhost:42110/settings#notion](http://localhost:42110/settings#notion). Click `Save`.
|
||||
5. Click `Configure` in http://localhost:42110/settings to index your Notion workspace(s).
|
||||
|
||||
That's it! You should be ready to start searching and chatting. Make sure you've configured your [chat settings](/get-started/setup#2-configure).
|
||||
That's it! You should be ready to start searching and chatting. Make sure you've configured your [chat settings](/get-started/setup#use-khoj).
|
||||
|
||||
@@ -22,7 +22,7 @@ See [the setup guide](/get-started/setup.mdx) to configure your chat models.
|
||||
- **On Web**: Open [/chat](https://app.khoj.dev/chat) in your web browser
|
||||
- **On Obsidian**: Search for *Khoj: Chat* in the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
|
||||
- **On Emacs**: Run `M-x khoj <user-query>`
|
||||
2. Enter your queries to chat with Khoj. Use [slash commands](#commands) and [query filters](/miscellaneous/advanced#query-filters) to change what Khoj uses to respond
|
||||
2. Enter your queries to chat with Khoj. Use [slash commands](#commands) and [query filters](/miscellaneous/query-filters) to change what Khoj uses to respond
|
||||
|
||||
|
||||
#### Details
|
||||
@@ -30,7 +30,7 @@ See [the setup guide](/get-started/setup.mdx) to configure your chat models.
|
||||
2. These notes, the last few messages and associated metadata is passed to the enabled chat model along with your query to generate a response
|
||||
|
||||
#### Conversation File Filters
|
||||
You can use conversation file filters to limit the notes used in the chat response. To do so, use the left panel in the web UI. Alternatively, you can also use [query filters](/miscellaneous/advanced#query-filters) to limit the notes used in the chat response.
|
||||
You can use conversation file filters to limit the notes used in the chat response. To do so, use the left panel in the web UI. Alternatively, you can also use [query filters](/miscellaneous/query-filters) to limit the notes used in the chat response.
|
||||
|
||||
<img src="/img/file_filters_conversation.png" alt="Conversation File Filter" style={{width: '400px'}}/>
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ You have a couple of image generation options.
|
||||
We support most state of the art image generation models, including Ideogram, Flux, and Stable Diffusion. These will run using [Replicate](https://replicate.com). Here's how to set them up:
|
||||
|
||||
1. Get a Replicate API key [here](https://replicate.com/account/api-tokens).
|
||||
1. Create a new [Text to Image Model](http://localhost:42110/server/admin/database/texttoimagemodelconfig/). Set the `type` to `Replicate`. Use any of the model names you see [on this list](https://replicate.com/pricing#image-models).
|
||||
2. Create a new [Text to Image Model](http://localhost:42110/server/admin/database/texttoimagemodelconfig/). Set the `type` to `Replicate`. Use any of the model names you see [on this list](https://replicate.com/pricing#image-models). We recommend the `model name` `black-forest-labs/flux-1.1-pro` from [Replicate](https://replicate.com/black-forest-labs/flux-1.1-pro).
|
||||
|
||||
### OpenAI
|
||||
|
||||
1. Get [an OpenAI API key](https://platform.openai.com/settings/organization/api-keys).
|
||||
2. Setup your OpenAI API key, if you haven't already. See instructions [here](/get-started/setup#2-configure)
|
||||
3. Create a text to image config at http://localhost:42110/server/admin/database/texttoimagemodelconfig/. We recommend the `model name` `dall-e-3`. Make sure to associate it with the OpenAI API chat configuration you setup in step 2 with `Openai config` field.
|
||||
2. Setup your OpenAI API key, if you haven't already. See instructions [here](/get-started/setup#add-chat-models)
|
||||
3. Create a text to image config at http://localhost:42110/server/admin/database/texttoimagemodelconfig/. Use `model name` `dall-e-3` to you use openai for image generation. Make sure to set the `Ai model api` field to the the OpenAI AI model api you setup in step 2.
|
||||
|
||||
@@ -11,7 +11,7 @@ Take advantage of super fast search to find relevant notes and documents from yo
|
||||
- **On Web**: Open https://app.khoj.dev/ in your web browser
|
||||
- **On Obsidian**: Click the *Khoj search* icon 🔎 on the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon) or Search for *Khoj: Search* in the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
|
||||
- **On Emacs**: Run `M-x khoj <user-query>`
|
||||
2. Query using natural language to find relevant entries from your knowledge base. Use [query filters](/miscellaneous/advanced#query-filters) to limit entries to search
|
||||
2. Query using natural language to find relevant entries from your knowledge base. Use [query filters](/miscellaneous/query-filters) to limit entries to search
|
||||
|
||||
### Demo
|
||||

|
||||
|
||||
@@ -17,11 +17,11 @@ You can also click on the speaker icon next to any message to hear it out loud.
|
||||
|
||||
Voice chat will automatically be configured when you initialize the application. The default configuration will run locally. If you want to use the OpenAI whisper API for voice chat, you can set it up by following these steps:
|
||||
|
||||
1. Setup your OpenAI API key. See instructions [here](/get-started/setup#2-configure).
|
||||
1. Setup your OpenAI API key. See instructions [here](/get-started/setup#add-chat-models).
|
||||
2. Create a new configuration at http://localhost:42110/server/admin/database/speechtotextmodeloptions/. We recommend the value `whisper-1` and model type `Openai`.
|
||||
|
||||
If you want to use the Text to Speech feature, you can set it up by following these steps:
|
||||
|
||||
1. Setup your account on [ElevenLabs.io](https://elevenlabs.io/).
|
||||
2. Configure your API key in your environment variables with the key `ELEVEN_LABS_API_KEY`.
|
||||
2. (Optional) Create a new [Voice model option](http://localhost:42110/server/admin/database/voicemodeloption/) with a specific voice ID from whichever voice you want to use. You can explore the options [here](https://elevenlabs.io/app/voice-library).
|
||||
3. (Optional) Create a new [Voice model option](http://localhost:42110/server/admin/database/voicemodeloption/) with a specific voice ID from whichever voice you want to use. You can explore the options [here](https://elevenlabs.io/app/voice-library).
|
||||
|
||||
@@ -6,20 +6,22 @@ sidebar_position: 2
|
||||
|
||||
Here are some top-level performance metrics for Khoj. These are rough estimates and will vary based on your hardware and data.
|
||||
|
||||
:::info
|
||||
These performance metrics were last evaluated in 2022.
|
||||
:::
|
||||
|
||||
### Search performance
|
||||
|
||||
- Semantic search using the bi-encoder is fairly fast at \<100 ms across all content types
|
||||
- Reranking using the cross-encoder is slower at \<2s on 15 results. Tweak `top_k` to tradeoff speed for accuracy of results
|
||||
- Semantic search using the default embeddings model is fairly fast at \<100 ms across all content types
|
||||
- Reranking using the cross-encoder model is slower at \<2s on 15 results. Tweak `top_k` to tradeoff speed for accuracy of results
|
||||
- Filters in query (e.g. by file, word or date) usually add \<20ms to query latency
|
||||
|
||||
### Indexing performance
|
||||
|
||||
- Indexing is more strongly impacted by the size of the source data
|
||||
- Indexing 100K+ line corpus of notes takes about 10 minutes
|
||||
- Indexing 4000+ images takes about 15 minutes and more than 8Gb of RAM
|
||||
- Note: *It should only take this long on the first run* as the index is incrementally updated
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- Testing done on a Mac M1 and a \>100K line corpus of notes
|
||||
- Search, indexing on a GPU has not been tested yet
|
||||
|
||||
Reference in New Issue
Block a user