Skip to content

Commit

Permalink
Merge branch 'cheshire-cat-ai:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sambarza authored Nov 18, 2023
2 parents 45ca33c + 378142d commit 1093a6b
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 2 deletions.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ nav:
- Main Prompt: conceptual/prompts/main_prompt.md
- Instruction Prompt: conceptual/prompts/instructions.md
- Summarization Prompt: conceptual/prompts/summarization.md
- The Vector Memory: conceptual/memory/vector_memory.md
- The Long Term Memory:
- Introduction: conceptual/memory/long_term_memory.md
- Episodic Memory: conceptual/memory/episodic_memory.md
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mkdocs/assets/img/vector_memory/cosine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions mkdocs/llm-concepts/vector-memory.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# Vector Memory

When we talk about Vector Memory we talk about Vector Database.
A Vector Database is a particular kind of DB that stores information in form of high-dimensional vectors called embeddings.
The embeddings are representations of text, image, sounds, ...

![word_embeddings](../assets/img/vector_memory/word_embeddings.png)

As Vector Memory the Cheshire-Cat using [Qdrant])(https://qdrant.tech/), the VectorDBs offer also optimized methods for information retrieval usually based on [Cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). From wikipedia

> *"Cosine similarity is a measure of similarity between two non-zero vectors defined in an inner product space. Cosine similarity is the cosine of the angle between the vectors; that is, it is the dot product of the vectors divided by the product of their lengths. It follows that the cosine similarity does not depend on the magnitudes of the vectors, but only on their angle."*
![cosine similarity](../assets/img/vector_memory/cosine.png)

## Semantic Search

Semantic search seeks to improve search accuracy by understanding the content of the search query. The idea is to create an high-dimensional semantic space and at search time to find the nearest point (documents) to our questions.

To create the vectors you must use an [encoder](https://cheshire-cat-ai.github.io/docs/llm-concepts/encoder/), the vector are stored on the vector memory, when a query is done the encoder calculates its embedding, the VectorDB calculates the cosine similaity between query and stored points and the K nearest are returned.

![semantic_search](https://raw.githubusercontent.com/UKPLab/sentence-transformers/master/docs/img/SemanticSearch.png)

### Search in high-dimensional spaces

Since the KNN is an algorithm whose performance degrades as the number of comparisons to be made increases, and since VectorDBs can contain as many as billions of vectors the technique used to efficiently find the closest points in high-dimensional spaces is usually [Approximate Nearest Neighbors](https://www.youtube.com/watch?v=DRbjpuqOsjk).
2 changes: 2 additions & 0 deletions mkdocs/made-with-the-cat.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# 👋 Made with the Cat

If you're curious to see what people have already done with the Cat, visit our dedicated
[:fontawesome-brands-discord: Discord Channel!](https://discord.com/channels/1092359754917089350/1099439547500220427)
32 changes: 31 additions & 1 deletion mkdocs/plugins-registry/installing-plugin.md
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
# 📥 Installing a Plugin from the Registry
# 📥 Installing a Plugin from the Registry

Installing plugins from our registry is a seamless process that enhances your Cheshire Cat AI experience. Whether you're seeking specific functionalities or exploring new features, our registry offers a diverse range of plugins ready for installation.

## Through the Admin Dashboard

1. **Navigation**: Access the Cheshire Cat AI Admin.
2. **Plugins Tab**: Click on the "Plugins" tab within the dashboard.
3. **Search and Filter**: Use the search or filter options to locate your desired plugin.
4. **Installation**: Once you've found the plugin, click the "Install" button.
5. **Wait for Completion**: Allow the installation process to complete. Although our dashboard doesn't feature an automatic refresh mechanism, wait for a few seconds and manually refresh your browser page.


![Admin plugin install from registry](../assets/img/admin_screenshots/install-plugin-from-registry.gif)

## Manual Installation

For those inclined towards manual installation, follow these steps:

1. **Download the Zip**: Access the plugin of interest [in the registry](https://github.com/cheshire-cat-ai/plugins) following the GitHub URL and download its zip file.
2. **Upload**: In the top right corner of the Plugins page, locate and click the "Upload Plugin" button.
3. **Upload Zip**: Upload the downloaded zip file using this feature.

Manual installation grants users more control over the process and facilitates the installation of specific plugins outside the registry itself.

## Post-Installation Steps

After installing a plugin, consider these steps:

- **Refresh**: Manually refresh the page in your browser after a few moments. This ensures any freshly installed plugins display accurately within the dashboard.
- **Settings Configuration**: If the newly installed plugin requires setup or configuration, look for the cog icon associated with the plugin. Click on it to access and adjust the plugin's settings according to your preferences.
13 changes: 12 additions & 1 deletion mkdocs/plugins-registry/publishing-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Below is a list of the fields with a brief explanation.

## 👀 Submit Your Plugin for Review

The submission and review process is done through our GitHub repository [awesome-plugins](https://github.com/cheshire-cat-ai/awesome-plugins) and it's quite straightforward. All you need to do is fork the repository and then, after adding your plugin to the JSON file, submit a Pull Request to us.
The submission and review process is done through our [plugins GitHub repository](https://github.com/cheshire-cat-ai/plugins) and it's quite straightforward. All you need to do is fork the repository and then, after adding your plugin to the JSON file, submit a Pull Request to us.

The fields to add to the new object you'll be adding are as follows:

Expand All @@ -64,6 +64,17 @@ The review process may take a few days, so don't worry if some time passes befor

The review is in place to prevent the publication of plugins containing malware, obvious security flaws, or of low quality and relevance. We will be diligent, but we ask for your understanding and request that you always submit tested plugins that do not jeopardize the security of our users.

### ⏳ Registry Cache Expiry

Upon successful submission, your plugin enters our registry cache, which updates periodically. However, it's important to note that this cache has a duration of 24 hours (1440 minutes) before it refreshes. During this time, newly submitted plugins might not immediately appear in the registry.
Why the Wait?

The caching mechanism optimizes the performance of our registry, efficiently managing and updating plugin listings.

If, after patiently waiting within this 24-hour window, your plugin doesn't show up in the registry, then it's time to let us know. We're here to assist you! Reach out to our support team or report the issue via our [plugins GitHub repository](https://github.com/cheshire-cat-ai/plugins/issues). Please provide relevant details, including the submission date and any steps you've taken.

Remember, our goal is to make your plugin available to our community seamlessly. Your cooperation and patience in allowing for the cache expiry are appreciated as we work to ensure a smooth plugin publishing process.


## 🔔 Stay Updated

Expand Down

0 comments on commit 1093a6b

Please sign in to comment.