⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

carrel-search

fengzhenfei@fengzhenfei⭐ 799 stars· last commit 8d ago· 0 open issues

Query the user's local knowledge bases through the Carrel search API, fetch original text or images as needed, compose the answer, list the reference files and offer follow-up directions drawn from the knowledge graph. Use when the user asks to search the knowledge base, find evidence in the stored material, compare records, or answer from several documents together.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 799 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Carrel

English | 中文

tests License: MIT

Ontology-Augmented Generation for AI agents.

Carrel is a self-hosted knowledge base for AI agents. It automates document parsing, indexing, and retrieval, with optional knowledge graphs. Agents use its API to retrieve source passages, images, and related facts, then generate their own answers.

Use it to give an agent access to a collection of product documents, research, contracts, meeting notes, or other files that change over time. A web console manages knowledge bases, models, and processing tasks. A bundled search skill connects agents such as Claude Code and Codex to the retrieval service.

0.4.1 general retrieval benchmarks and codebase capabilities · Full 0.4.0 capability evaluation

Features · Evaluation · Design · Quick start · Agent integration · Documentation

Features

Carrel 0.4.4 improves PDF and table chunking, image descriptions and index recovery, and ships MinerU 3.4.5 with CJK font checks. Changes and upgrade steps

  • Document parsing: PDF, Word, PowerPoint, spreadsheets, images, HTML, Markdown, notebooks, source code, and workflow files, with processing suited to each format. Format details.
  • Automatic updates: scan for file changes, update indexes, and maintain enabled knowledge graphs through scheduled tasks.
  • Hybrid retrieval: combine vector, keyword, graph, and visual search, with automatic knowledge-base selection and optional text/image reranking with rank fusion.
  • Knowledge graphs: extract entity types, relationships, and facts from your documents; retain sources, time information, and conflict indicators, compare graph versions, and apply reviewed, evidence-scoped corrections.
  • Agent access: search through an API, fetch surrounding text or original images, and follow graph relationships when more evidence is needed.
  • Web console: configure processing, inspect chunks and graphs, track tasks, and manage services. Available in English and Chinese.

Capability evaluation

Across 275 text queries, 0.4.1 reached 93.45% evidence Hit@5 and 0.8141 MRR@10. In a separate study of 24 code questions, Haiku answered 13 completely from the first response and 23 with Skill follow-up. 0.4.1 evaluation

The full 0.4.0 evaluation also covers graph rebuild stability, time-scoped evidence, conflicts and ontology governance. Full 0.4.0 technical report

How it works

flowchart LR
    D[Document folders] --> P[Parse and chunk]
    P --> I[Vector and keyword indexes]
    P --> G[Optional knowledge graphs]
    I --> R[Retrieval API]
    G --> R
    R --> A[AI agent]
    A -->|Follow-up queries| R

Carrel uses MinerU and native parsers for ingestion. Standard uses Qdrant, OpenSearch and Neo4j; Light uses embedded LanceDB and DuckDB. SQLite tracks files and tasks in both editions. Model services run independently, locally or through compatible hosted endpoints. See Architecture for the pipeline and retrieval design.

Design

Carrel provides general knowledge storage, retrieval, and evidence interfaces. Entities, relationships, and facts retain sources, time information, and conflicts so agents can check and use them alongside the original documents. Default retrieval retains historical and future source claims. An explicit time query selects the relevant evidence; reviewed corrections record which sources and identities the decision applies to. The Agent Loop plugin is in development and not yet implemented. It is intended to use these interfaces to continuously learn an enterprise ontology, seek clarification from relevant people, and maintain correction rules.

Routine graph updates merge new and changed content incrementally. Configured time or change thresholds trigger full rebuilds, balancing update cost with overall consistency. Parsing, indexing, and graph construction are maintained separately: rebuilding a graph can reuse parsed content and chunks while preserving RAG indexes.

Requirements

  • Docker with Compose v2. Python and background scheduling run inside the application container.
  • A text embedding endpoint; a vision-language endpoint for image descriptions; and a chat model for knowledge graph construction, if enabled.
  • An NVIDIA GPU and NVIDIA Container Toolkit for GPU parsing. CPU parsing is also supported. Resource needs depend on the parser and collection size.
PlatformDeployment
Linux with NVIDIA GPUGPU parsing with NVIDIA Container Toolkit; container scheduling
Linux without GPUCPU parsing; connect to model services on another host or a provider
macOS with Docker DesktopCPU parsing and application containers, including scheduling
WindowsUse WSL2; native Windows deployment is not supported

Example setup describes the author's installation on an NVIDIA DGX Spark and some lighter alternatives.

Quick start

1. Deploy the services

git clone https://github.com/FengZhenfei/carrel.git
cd carrel
./deploy.sh --standard --build
# Or use embedded storage:
# ./deploy.sh --light --build

The optional script prepares Compose configuration and starts the application, background scheduler and selected dependencies. You can also use Compose directly. First startup downloads MinerU parser assets. See Container deployment.

2. Configure model endpoints

Choose Standard for Qdrant, OpenSearch and Neo4j, or Light for embedded LanceDB and DuckDB. The edition is fixed for that deployment directory. Both include MinerU; Light has no database containers. See Storage editions.

In System settings, configure LLM, Embedding and Reranker endpoints, model IDs and API keys. Register a vision-capable LLM and select it as the Multimodal model for each knowledge base. Images, charts and table review share that selection. Models can run on your own machines or hosted platforms. Carrel does not start these model services or download their weights. See Model configuration.

3. Add documents

Open the console at http://127.0.0.1:9800. Put documents in data/runtime/mirror/<folder>/, then enable that folder in the console. Each enabled folder becomes a knowledge base; scheduled tasks process its files.

For a knowledge graph, register a chat model with its Max Input in the console, select it in the knowledge-base settings, and enable graph building. Check service health and task progress in the console before making your first query.

Agent integration

Install the bundled carrel-search skill in your agent, or call the API directly:

The first container start creates KB_SEARCH_TOKEN in data/config/knowledge-base.env. Set CARREL_SEARCH_TOKEN to that value:

export CARREL_SEARCH_TOKEN='your search token'
curl -sS http://127.0.0.1:9810/search \
  -H "Authorization: Bearer $CARREL_SEARCH_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"question": "What are the delivery and acceptance requirements?", "top_k": 8}'

For a remote agent, configure CARREL_SEARCH_BASE_URL and CARREL_SEARCH_TOKEN in its environment.

Responses include source passages and, when available, graph evidence and image information. Agents can

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/carrel-search/SKILL.md7.8 KBupstream ↗
    ---
    name: carrel-search
    description: "Query the user's local knowledge bases through the Carrel search API, fetch original text or images as needed, compose the answer, list the reference files and offer follow-up directions drawn from the knowledge graph. Use when the user asks to search the knowledge base, find evidence in the stored material, compare records, or answer from several documents together."
    ---
    
    # Carrel-Search
    
    Evidence is retrieved through Carrel's search service (`app/kb_search`, default port 9810); the agent invoking this skill understands the question, composes the answer, lists the reference files and turns the graph leads into directions the user can ask about next. The service only recalls, reranks and arranges evidence and does no generation. The display name is **Carrel-Search** and the invocation name is `$carrel-search`.
    
    ## Invocation
    
    The client is `scripts/carrel_search.py` in this directory (Python 3.9+, standard library only). It defaults to `http://127.0.0.1:9810`; when the service runs on another machine, set the address and token through environment variables or a config file as described in [API and configuration](references/api.md). The skill contains no real token; never read or print one. `SKILL_DIR` stands for the directory containing this `SKILL.md`; replace it with the actual absolute path when executing.
    
    ```bash
    python3 "$SKILL_DIR/scripts/carrel_search.py" search --question "<the user's question>"
    ```
    
    - **Every command prints a compact view directly**: retrieval status, the text of the sources (each with the file and place it comes from), facts, page summaries and graph leads, and at the end "Reference files", one line per file. Only IDs, scores and debug fields are left out; document text is not: a hit is printed in full and the chunks before and after it follow it. The script keeps the complete response by itself; do not pass `--output` and do not write scripts of your own to parse it.
    - **What does not fit goes to the next page; nothing is cut off**: one output has a size limit, and every page ends by saying what the next page is and how to fetch it (`show <call id> --page 2`). Where it says "read on", read every page before using the result: reading back the original and listings are always like this, and so is a search whose best sources are too long for the first page, which then says so. Where it says "the full text of the other sources, to be read when useful", the next page holds the lower-ranked sources and neighbouring chunks of a search and may be skipped. An entry too long for a page continues on the next one, which opens with the same label and "(continued from the previous page)". To save room, the path of a file is written in full only the first time and "same file as S1" afterwards, and a table header repeated from an earlier chunk reads "HEADER: same as S3". "chunk 26 of 67" at the end of a source line is its position in the document and the document's length in chunks.
    - **Every entry has a label**: S a source, F a fact, P a page, E an entity, R a relation, H the neighbourhood of a subject (`H1.2` is its second relation), N a relation returned by a neighbourhood lookup. Later commands point at an entry with `--ref <call id>:<label>` instead of copying IDs or writing request files; only R cannot be used this way: a relation has two ends and is no starting point, so point at the entity entry of one of its ends. The table gives the subcommand and arguments only; each follows the same script:
    
      | To do this | Subcommand |
      |---|---|
      | Read the original around a chunk | `context --ref a1b2c3:S3` (`--before` / `--after` set how many chunks on each side, 1 by default; read on with `--after` when the matter continues on the following pages). A fact (F) and a neighbourhood relation (N) can be read back the same way |
      | Read a whole document (a whole table, a whole report) | `context --ref a1b2c3:S3 --whole`: one command, printed page by page; a document of more than 300 chunks is read in parts with `--before` / `--after` |
      | See the original picture, crop a part | `image --ref a1b2c3:S6`; `crop --ref a1b2c3:S6 --bbox 0.1,0.2,0.6,0.8`. View the saved file. `crop` only cuts a part out; it is no sharper than the original |
      | Walk one hop along the graph from an entity | `neighbors --ref a1b2c3:H1` (E, `H1.2` and N work the same; `--type` takes one kind of relation only, `--limit` up to 100) |
      | List the facts under an entity | `facts --ref a1b2c3:H1` (add `--property name` for one property) |
      | Search again inside one document | `search --question "…" --in-doc a1b2c3:S3` (the knowledge base follows the document; with `--kb` given and the document outside it, the command fails) |
      | See the full text or every field of an entry | `show a1b2c3:S9 a1b2c3:S13` (full text for sources and pages, every field for the rest); `show a1b2c3` prints the compact view of that call again and `show a1b2c3 --page 2` its next page |
    
    - Limit the scope with arguments: `--kb` (repeatable), `--top-k`, `--block-type table` (a soft preference for table lookups). Do not hard-code KB numbers and do not assume every knowledge base has a graph. Send commands that do not depend on each other together in one step instead of waiting for them one by one.
    - On a connection failure (DNS, timeout, 401/403) check the address, the service and the token as described in [API and configuration](references/api.md#connection) and tell the user the cause; it does not mean the knowledge base has no content.
    
    ## Answer flow
    
    1. **Search once.** Hand the user's question to `search`; the service picks the knowledge bases and runs keyword, vector, graph and picture recall plus reranking in one go. Normally use the user's own words and complete them only where needed: keep model numbers, parameter symbols, abbreviations and file names in their original spelling; write out the concrete years when a time range is known; for a comparison, give each subject its full name and add "respectively / compare" when the wording does not say so. Carry the scope along when the user restricts the knowledge base or document.
    2. **Read the result.** First the status in the opening lines: whether anything was found, whether there are gaps, whether the routing was weak (item 1 of "Using evidence"). Then the source text, the facts and the pages, and last the graph leads.
    3. **Answer directly.** Answer from the result of this search, resting on the source text, the facts and the pages. Do not walk along the graph this turn; the relations among the graph leads come without excerpts of the original, so they are leads and not grounds for a conclusion. Do not search again merely to rephrase or to be more thorough: a repeated search mostly returns the same documents. Documents the question did not ask about (another year, another edition, another product) are not read this turn; where comparing with them is worthwhile, offer it as a follow-up. Take one more step only in these cases, and only for the part the answer lacks:
       - a conclusion rests on details of a picture: look at the original (item 4 of "Using evidence");
       - the user asks for a complete list: use the listing commands (item 6 of "Using evidence");
       - the source the answer rests on is truncated, or lacks its table header or its conditions: read that place back with `context --ref`, a few chunks either side being enough, and do not read the whole document for it; a source shown by its opening words only is on the next page of the result;
       - the question asks for a complete item-by-item result, where missing a row means it is not answered (the full comparison of two editions across a whole table of entitlements, for example): read that one document in a single command with `context --ref … --whole` instead of probing it range by range. A general question such as "how is it, are there any problems" is not a reason to read a whole document: answer from the summaries, facts and hits the searc
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/fengzhenfei-carrel-skills-carrel-search.md

// REPO STATS

799 stars
0 open issues
Last commit: 8d ago