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

Replace Assistant v1 page with Assistant v2 page #516

Merged
merged 4 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function sidebarKagi() {
text: 'LLM Features', link: '/kagi/ai/kagi-ai',
collapsed: true,
items: [
{ text: 'Assistant', link: '/kagi/ai/assistant' },
{ text: 'The Assistant', link: '/kagi/ai/assistant' },
{ text: 'Quick Answer', link: '/kagi/ai/quick-answer' },
{ text: 'Summarize Page', link: '/kagi/ai/summarize-page' },
{ text: 'Discuss Document', link: '/kagi/ai/ask-questions' },
Expand Down
153 changes: 87 additions & 66 deletions docs/kagi/ai/assistant.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,118 @@
# Assistant
# The Assistant by Kagi

Kagi Assistant is a product feature backed by Kagi Search and large language models.
<br>

**Kagi Assistant is currently in open beta and available to [Ultimate plan](https://kagi.com/pricing) members.**
<video src="./media/assistant.mp4" width="720" type="video/mp4" autoplay muted loop playsinline disablepictureinpicture />

## Assistant Modes
The Assistant by Kagi combines the unparalleled results of Kagi Search with the latest large language models (LLM), making it the perfect companion for creative, research, and programming tasks — alongside everything else you can think of!

### Research
## Features

Research assistant uses Kagi search and external sources like Wolfram Alpha, together with an AI model to answer your queries.
This model also allows you to upload a file (up to 16 MB) or provide a URL (article, PDF, video, podcast, etc.) to use as context.
If an image is provided it will be processed using GPT4 Vision.
- Access to the latest and most performant large language models from OpenAI, Anthropic, Mistral, and Google
- Multiple [custom assistants](#custom-assistants)
- The ability to control whether the Assistant has web access (powered by Kagi Search).
- Applying Kagi Search [Lenses](../features/lenses.md) and [Personalized Results](../features/website-info-personalized-results.md) to the Assistant searches
- Switch between multiple threads from a single window
- Saving Assistant threads
- Altering the Assistant configuration within the thread
- For example, you can ask the initial question with web access enabled, and then disable it for subsequent questions!
- It is also possible to switch to a different LLM in the middle of a thread
- Code syntax highlighting
- [Keyboard Shortcuts](#keyboard-shortcuts)
- Export conversations to markdown format
- Share threads with others using a link
- Voice input

![Kagi Assistant - Research](./media/assistant_research.png){width=500px data-zoomable}
## Privacy

This mode is available in two variants:
When you use the Assistant by Kagi, your data is never used to train AI models, and no account information is shared with the LLM providers. By default, threads expire after 24 hours of inactivity (can be adjusted in [settings](https://kagi.com/settings/?p=assistant)).

- `Fast`: Kagi search coupled with a fast LLM (`Claude 3 Haiku`). Optimized for speed, while not sacrificing quality. Access directly with the `!fast` bang.
- `Expert`: Multiple Kagi searches (and external services) together with a better LLM (`GPT-4o`) for the highest accuracy and comprehensive responses. Access directly with the `!expert` bang.
## Using the Assistant

Research Assistant supports using [Lenses](../features/lenses.md) to filter the types of websites used as context to generate an answer. Lenses are predefined categories that help you focus on specific topics or sources. This allows you to restrict results to more trustworthy or relevant sites for your needs. To enable this feature, toggle the Lenses switch and select one of the available options.
The Assistant can be accessed via the Control Center located in the top right corner of all Kagi pages or by clicking on the link in the top right corner of the Kagi homepage. [The direct link](https://kagi.com/assistant) to the Assistant can also be used.

![Research Assistant - Lenses](./media/assistant_research_lenses.png){width=500px data-zoomable}
When you first access the Assistant, you will be greeted by a familiar-looking landing page, allowing you to get right into using it.
You can either type your prompt or use voice input by pressing the microphone symbol.
You can choose which LLM you wish to use by opening the dropdown menu just left of the prompt field.

Assistant's web access can be toggled via the button below the prompt field.

### Code
## Threads

Code assistant is tuned for programming tasks and uses a powerful AI model for programming.
The Assistant supports threads, allowing you to keep your bagel topping ideas separate from your weekend projects.

![Kagi Assistant - Code](./media/assistant_code.png){width=500px data-zoomable}
The search bar enables you to search for that one elusive thread.
Currently the search only looks through your thread titles.

This mode uses `gpt-4o`.
By default threads are kept for 24 hours after the last message.
If keeping threads alive permanently better fits your workflow, this setting can be adjusted in [Assistant Settings](https://kagi.com/settings/?p=assistant).
Please note that the thread saving setting is applied **when the thread is created**.

Access directly with the `!code` bang.
Threads can be renamed, added to Quick Access, shared, deleted, and downloaded via the `⋮` button which is displayed when you hover over the thread.

### Chat
The Quick Access feature can be used to better organize your threads but it will not influence the thread saving setting.
In other words, threads added to Quick Access will also be deleted after 24 hours unless you have chosen otherwise in the settings.

Chat assistant allows direct access to a variety of large language models for creative tasks.
You can also **preserve** threads with the star symbol, located to the left of the thread title.
Preserved threads do not expire.

![Kagi Assistant - Chat](./media/assistant_chat.png){width=500px data-zoomable}
## Custom Instructions

This mode supports the following models:
Do you prefer a more personalized Assistant experience?
You can provide custom instructions in the [Assistant Settings](https://kagi.com/settings?p=assistant).
These instructions can be utilized to refine the Assistant responses.
You can, for instance, instruct the Assistant to be more succinct or to consider your profession and location.

- OpenAI
- GPT 3.5 Turbo
- GPT 4
- GPT 4 Turbo
- GPT 4o
- Anthropic
- Claude 3 Haiku
- Claude 3.5 Sonnet
- Claude 3 Opus
- Google
- Gemini Pro
- Mistral AI
- Mistral Small
- Mistral Large

Access directly with the `!chat` bang.

![LLMs supported by Kagi Assistant](https://kagifeedback.org/assets/files/2024-03-26/1711457673-662718-image.png)

### Custom

Custom assistant allows you to further customize one of the existing modes.
## Custom Assistants {#custom-assistants}

![Kagi Assistant - Custom](./media/assistant_custom.png){width=500px data-zoomable}
You can create Custom Assistants in the [Assistant Settings](https://kagi.com/settings?p=assistant).
It is possible to customize the LLM, settings (the use of web access, lenses, and personalized results), and the instructions for each Custom Assistant.

Select the base mode (and variant/model where applicable) and add your own custom instructions. Setup is detailed in the [Assistant settings help page](../settings/assistant.md#custom-assistant).
Assistant comes with two predefined Custom Assistants:
- **Code**. Optimized for programming tasks. It uses Claude 3.5 Sonnet and has web access.
- **Research**. Optimized for information retrieval tasks. It relies on GPT-4o and has web access.

Access directly with the `!custom` bang.
## Keyboard Shortcuts {#keyboard-shortcuts}

## Tips and Tricks for using Kagi Assistant
The following keyboard shortcuts are available in the Assistant by Kagi on Mac and PC.

- Assistant has a character limit of 16,000 for each prompt in a conversation.
- You can input math equations using the LaTeX format.
- Using the copy button will copy the response to your clipboard preserving any formatting using markdown.
- Assistant supports syntax highlighting in generated code snippets.
- For optimal results, interact with the Assistant in a natural language. For instance, "Who was Alan Turing?" will yield a better response than simply "Alan Turing".
- When using Code Assistant, it is recommended to specify the programming language you are using as part of your prompt.
| Mac Shortcut | Action |
|:--|:--|
| &#8984; + K | New Thread |
| &#8984; + Shift + S | Toggle Sidebar |
| &#8984; + Shift + C | Copy Last Response |
| &#8984; + Shift + E | Edit Last Message |
| &#8984; + Shift + Backspace | Delete Current Thread |
| &#8984; + / | Focus Prompt Box |
| &#8963; + ? | Show Keyboard Shortcuts |

## Chat Mode Scorecard Criteria
| PC Shortcut | Action |
|:--|:--|
| Ctrl + K | New Thread |
| Ctrl + Shift + S | Toggle Sidebar |
| Ctrl + Shift + C | Copy Last Response |
| Ctrl + Shift + E | Edit Last Message |
| Ctrl + Shift + Backspace | Delete Current Thread |
| Ctrl + / | Focus Prompt Box |
| Ctrl + ? | Show Keyboard Shortcuts |

When you visit Assistant's Chat Mode landing page, you will be presented with a scorecard comparing different aspects of each model.
## LLMs Available in The Assistant

The Privacy column in the scorecard rates each model based on how it handles user data. The criteria are:
The Assistant provides access to the following LLMs:

- 1 circle: No data retention period specified.
- 2 circles: Data retained for more than 30 days before deletion.
- 3 circles: Data retained for 30 days or less before deletion.
- 4 circles: No data retained.

None of the models train on user data.

Check also [Kagi LLM Benchmarking Project](./llm-benchmark.md).
- Anthropic
- Claude 3 Haiku
- Claude 3.5 Sonnet
- Claude 3 Opus
- OpenAI
- GPT 3.5 Turbo
- GPT 4
- GPT 4 Turbo
- GPT 4o
- Mistral AI
- Mistral Nemo
- Mistral Large
- Google
- Gemini Pro

You can learn more about how these models compare in the [Kagi LLM Benchmarking Project](./llm-benchmark.md) page.
118 changes: 0 additions & 118 deletions docs/kagi/ai/assistant2.md

This file was deleted.

Loading
Loading