Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #309 from janhq/update-docs
Browse files Browse the repository at this point in the history
Added the missing Retrieval
  • Loading branch information
urmauur authored Aug 26, 2024
2 parents d63bdc8 + 9570a7d commit d7b1a21
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"type": "separator"
},
"models": "Models",
"tools": "Tools",
"threads": "Threads",
"settings": "Settings",
"shortcuts": "Keyboard Shortcuts",
Expand Down
61 changes: 61 additions & 0 deletions src/pages/docs/tools/retrieval.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Knowledge Retrieval
description: A step-by-step guide to chat with PDF documents.
keywords:
[
Jan,
Customizable Intelligence, LLM,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
use tools,
rag,
retrieval,
chat with pdf,
]
---

import { Callout, Steps } from 'nextra/components'

# Knowledge Retrieval
This article lists the capabilities of the Jan platform and guides you through using RAG to chat with PDF documents.
<Callout type="warning">
To access this feature, please enable Experimental mode in the [Advanced Settings](/guides/advanced/#enable-the-experimental-mode).
</Callout>

## Enable the Knowledge Retrieval

To chat with PDFs using RAG in Jan, follow these steps:

1. Create a **new thread**.
2. Click the **Tools** tab.
<br/>
![Retrieval](../_assets/tools.png)
<br/>
3. Enable the **Retrieval**.
<br/>
![Retrieval](../_assets/retrieval1.png)
<br/>
4. Adjust the **Retrieval** settings as needed. These settings include the following:

| Feature | Description |
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Retrieval** | - Utilizes information from uploaded files, automatically retrieving content relevant to your queries for enhanced interaction.<br></br>- Use this for complex inquiries where context from uploaded documents significantly enhances response quality. |
| **Embedding Model** | - Converts text into numerical representations for machine understanding.<br></br>- Choose a model based on your needs and available resources, balancing accuracy and computational efficiency. |
| **Vector Database** | - Facilitates quick searches through stored numerical text representations to find relevant information efficiently.<br></br>- Optimize your vector database settings to ensure quick retrieval without sacrificing accuracy, particularly in applications with large data sets. |
| **Top K** | - Determines the number of top-ranked documents to retrieve, allowing control over search result relevance.<br></br>- Adjust this setting based on the precision needed. A lower value for more precise, focused searches and a higher value for broader, more comprehensive searches. |
| **Chunk Size** | - Sets the maximum number of tokens per data chunk, which is crucial for managing processing load and maintaining performance.<br></br>- Increase the chunk size for processing large blocks of text efficiently, or decrease it when dealing with smaller, more manageable texts to optimize memory usage. |
| **Chunk Overlap** | - Specifies the overlap in tokens between adjacent chunks to ensure continuous context in split text segments.<br></br>- Adjust the overlap to ensure smooth transitions in text analysis, with higher overlap for complex texts where context is critical. |
| **Retrieval Template**| - Defines the query structure using variables like `{CONTEXT}` and `{QUESTION}` to tailor searches to specific needs.<br></br>- Customize templates to closely align with your data's structure and the queries' nature, ensuring that retrievals are as relevant as possible. |
5. Select the model you want to use.
<Callout type="info">
To upload an image or GIF, ensure that you are using a multimodal model. If not, you are limited to uploading documents only.
</Callout>
6. Click on the 📎 icon in the chat input field.
7. Select **Document** to upload a document file.
<br/>
![Retrieval](../_assets/retrieval2.png)

0 comments on commit d7b1a21

Please sign in to comment.