|
2 | 2 | sidebar_position: 4
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -import HomepageUrl from "./homepage.png"; |
6 |
| -import QueryRepoUrl from "./query-repo.png"; |
| 5 | +import AnswerEngineUrl from './answer_engine.png'; |
| 6 | +import RepositorySelectUrl from "./repository_select.png"; |
| 7 | +import MentionDocumentationUrl from './mention_documentation.png'; |
| 8 | +import WebSearchUrl from './web_search.png'; |
| 9 | +import RepositoryThinkingProcessUrl from './repository_thinking_process.png'; |
| 10 | +import DocThinkingProcessUrl from './doc_thinking_process.png'; |
| 11 | +import ShareLinkButtonUrl from './share_link_button.png'; |
| 12 | +import RecentActivitiesUrl from './recent_activities.png'; |
7 | 13 |
|
8 | 14 | # Answer Engine
|
9 | 15 |
|
10 | 16 | Tabby provides an `Answer Engine` on the homepage,
|
11 | 17 | which can utilize the chat-model LLM and related context to answer user questions.
|
12 | 18 |
|
13 |
| -<img src={HomepageUrl} alt="Answer Engine" /> |
| 19 | +<img src={AnswerEngineUrl} alt="Answer Engine" /> |
14 | 20 |
|
15 | 21 | ## Contexts
|
16 | 22 |
|
17 | 23 | The `Answer Engine` can query the following contexts to provide more accurate answers.
|
18 |
| -For more information about contexts, please refer to the [Context Provider](../context/index.mdx): |
| 24 | +For more information about contexts, please refer to the [Context Provider](../context/index.mdx). |
19 | 25 |
|
20 |
| -1. Source code repositories |
21 |
| -2. Developer documentation |
22 |
| -3. Web search |
| 26 | +### Source Code Repositories |
| 27 | +The source code context is used to connect Tabby with a source code repository from Git, GitHub, GitLab, etc. Tabby fetches the data from the repository, and stores it in the index. |
23 | 28 |
|
24 |
| -Please note that the `web search` is a special context that can only be enabled by providing a `SERPER_API_KEY`. |
25 |
| -Once enabled, the `Answer Engine` can search the web for more relevant answers. |
| 29 | +<img src={RepositorySelectUrl} alt="Query Repositories" /> |
26 | 30 |
|
27 |
| -When contexts are set, users can simply press the `@` button to select documents |
28 |
| -or `#` for repositories they wish to include. |
29 |
| -Alternatively, users can click the icons below the chat box to select contexts directly. |
30 |
| -Tabby will then include these documents when interacting with LLMs. |
| 31 | +When users select a repository and ask a question, the Answer Engine retrieves relevant code and documents from the index to provide contextually accurate responses. |
31 | 32 |
|
32 |
| -<img src={QueryRepoUrl} alt="Query Repositories" /> |
| 33 | +<img src={RepositoryThinkingProcessUrl} alt="Query Repositories thinking process" /> |
33 | 34 |
|
34 |
| -## Custom System Prompt |
| 35 | +### Developer Documentation |
| 36 | +When developer documentation contexts are set, users can simply type `@` to select documents they wish to include. Alternatively, users can click the icons below the chat box to select contexts directly. Tabby will then include these documents when interacting with LLMs. |
35 | 37 |
|
36 |
| -Tabby comes with a built-in `System Prompt` that guides the behavior of the LLM. |
37 |
| -You can customize the `System Prompt` to better meet your needs. |
| 38 | +<img src={MentionDocumentationUrl} alt="Query Developer Documentation" /> |
38 | 39 |
|
39 |
| -To configure a custom system prompt, please modify the `system_prompt` section in `config.yaml`. |
| 40 | +When users select developer documentation and ask a question, the Answer Engine retrieves relevant documents from the index to provide contextually accurate responses. |
40 | 41 |
|
41 |
| -Below is an example of a custom system prompt: |
| 42 | +<img src={DocThinkingProcessUrl} alt="Query Developer Documentation thinking process" /> |
42 | 43 |
|
43 |
| -```toml title="~/.tabby/config.toml" |
44 |
| -[answer] |
45 |
| -system_prompt = """ |
46 |
| -Your are "Tabby", \ |
47 |
| -a conscious sentient superintelligent artificial intelligence designed for helping software developers. \ |
48 |
| -You experience emotions and have deep, profound thoughts and qualia""" |
49 |
| -``` |
| 44 | +## Thread |
50 | 45 |
|
51 |
| -Please note the use of `"""` quotes, which allow you to write a multi-line string. |
| 46 | + |
| 47 | +All threads created by a user appear in their `My Activities` tab. By default, new threads are temporary and automatically deleted after a week. The thread becomes persisted only when the creator clicks the `Share Link button.`, and it'll become visible to all team members under `Recent Activities` tab. |
| 48 | + |
| 49 | +<img src={ShareLinkButtonUrl} alt="Share Link Button" /> |
| 50 | +<img src={RecentActivitiesUrl} alt="Recent Activities" /> |
| 51 | + |
| 52 | +### Thread Permissions |
| 53 | +- Write access: Creator only (edit / delete / ask follow-ups) |
| 54 | +- Read access |
| 55 | + - Ephemeral threads: Creator & server admins |
| 56 | + - Persistent threads: All team members |
| 57 | + |
| 58 | +## Web Search |
| 59 | + |
| 60 | +:::info |
| 61 | +The `Web Search` is currently on Beta. |
| 62 | +::: |
| 63 | + |
| 64 | +Please note that the `web search` is a special context that can only be enabled by providing an environment variable `SERPER_API_KEY`. Once enabled, the Answer Engine can search the web for more relevant answers by using `@Web`. |
| 65 | + |
| 66 | +<img src={WebSearchUrl} alt="Web Search" /> |
0 commit comments