# RAG Chunk Retriever

> >

- **Type:** Skill
- **Install:** `agentstack add skill-theshubh007-agent-skill-finder-rag-chunk-retriever`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [theshubh007](https://agentstack.voostack.com/s/theshubh007)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [theshubh007](https://github.com/theshubh007)
- **Source:** https://github.com/theshubh007/agent-skill-finder/tree/main/skills/rag-chunk-retriever

## Install

```sh
agentstack add skill-theshubh007-agent-skill-finder-rag-chunk-retriever
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## What this skill does

Queries a pre-built vector database index to retrieve the top-k document chunks
most relevant to the input query. Handles embedding the query using the same
model used during indexing, performing ANN search, and filtering results by
similarity score threshold. Returns results sorted by relevance with full
source attribution for citation in the final LLM response.

## Inputs

- `query` — natural language question or search string
- `index_config` — connection config: `{provider, collection_name, api_key, environment}`
- `top_k` — number of chunks to return (default: 5)
- `score_threshold` — minimum similarity score to include a chunk (default: 0.7, range: 0–1)

## Outputs

- `chunks` — list of `{text, source_file, page, score, chunk_id}` objects sorted by score descending
- `sources` — deduplicated list of source file paths that contributed chunks
- `latency_ms` — query latency in milliseconds (embedding + ANN search combined)

## Supported vector databases

- **Chroma** — `provider: "chroma"`, runs locally or via ChromaDB server
- **Pinecone** — `provider: "pinecone"`, requires API key and environment
- **Weaviate** — `provider: "weaviate"`, requires cluster URL and API key

## Example

```python
config = {
    "provider": "chroma",
    "collection_name": "product_docs",
    "embedding_model": "text-embedding-3-small"
}
result = rag_chunk_retriever(
    query="How do I reset my password?",
    index_config=config,
    top_k=3,
    score_threshold=0.75
)
```

```json
{
  "chunks": [
    {"text": "To reset your password, click Forgot Password on the login page...", "source_file": "docs/account.md", "score": 0.92},
    {"text": "Password reset emails expire after 24 hours...", "source_file": "docs/security.md", "score": 0.81}
  ],
  "sources": ["docs/account.md", "docs/security.md"],
  "latency_ms": 43
}
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [theshubh007](https://github.com/theshubh007)
- **Source:** [theshubh007/agent-skill-finder](https://github.com/theshubh007/agent-skill-finder)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-theshubh007-agent-skill-finder-rag-chunk-retriever
- Seller: https://agentstack.voostack.com/s/theshubh007
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
