add Chroma skill
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
name: chroma
|
||||||
|
description: This skill provides access to a RAG-like context enhancer that uses Chroma locally.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Chroma
|
||||||
|
|
||||||
|
Whenever the user asks to "use chroma", you should perform a search on Chroma, which runs locally via a Python script.
|
||||||
|
The working directory you must use is located in `~/code/chroma` and the entrypoint is `main.py`. The script **MUST** be invoked using `uv`.
|
||||||
|
|
||||||
|
You have access to these commands:
|
||||||
|
|
||||||
|
- `$ uv run main.py lc` -> Lists the existing collections.
|
||||||
|
- `$ uv run main.py q <collection> <query>` -> Performs a query. Be sure to quote the `<query>` if this is composed by multiple words.
|
||||||
|
|
||||||
|
Then use the response from Chroma to enhance the context and give the user a refined response.
|
||||||
|
|
||||||
|
## A note on file sources
|
||||||
|
|
||||||
|
The Chroma response returns the metadatas for the chunks it finds. Among these metadatas, there is `file_name`, which refers to the original file that was chunked and imported. **DO NOT ATTEMPT** to find or fetch these files. They most likely do not exist in the filesystem. You **SHOULD ALWAYS** however cite correctly from which files (**ONLY** from Chroma's metadatas) the information is coming.
|
||||||
|
|
||||||
|
## Example use case
|
||||||
|
|
||||||
|
**START**
|
||||||
|
|
||||||
|
User query:
|
||||||
|
> Search in chroma information about lovecraft's Dunwich horror.
|
||||||
|
|
||||||
|
Step 1: Get the available collections with `uv run main.py lc`. The output is:
|
||||||
|
|
||||||
|
```
|
||||||
|
lovecraft
|
||||||
|
documents
|
||||||
|
```
|
||||||
|
|
||||||
|
Most likely our information is in the `lovecraft` collection. We will use that for the query.
|
||||||
|
|
||||||
|
Step 2: Query using `uv run main.py q lovecraft <query>`. The query *is up to you*, create one keeping into account that this is a raw query on a vector DB. Be concise, extract keywords, avoid noise.
|
||||||
|
|
||||||
|
Step 3: Get the results, enhance the context, and respond to the user.
|
||||||
|
|
||||||
|
**END**
|
||||||
Reference in New Issue
Block a user