askill
rag-retrieval

rag-retrievalSafety 90Repository

Hybrid search (embedding + BM25) for retrieving relevant clinical note passages. Use for finding source evidence to support claims in summaries and recommendations.

0 stars
1.2k downloads
Updated 10/25/2025

Package Files

Loading files...
SKILL.md

RAG Retrieval Skill

Overview

Retrieves relevant text passages from clinical notes using hybrid search combining dense embeddings (semantic similarity) and BM25 (keyword matching).

When to Use

  • Find source passages for clinical claims
  • Retrieve evidence for treatment recommendations
  • Support citation generation with relevant context

Installation

IMPORTANT: This skill has its own isolated virtual environment (.venv) managed by uv. Do NOT use system Python.

Initialize the skill's environment:

# From the skill directory
cd .agent/skills/rag-retrieval
uv sync  # Creates .venv and installs dependencies from pyproject.toml

Usage

CRITICAL: Always use uv run to execute code with this skill's .venv, NOT system Python.

# From .agent/skills/rag-retrieval/ directory
# Run with: uv run python -c "..."
from rag_retrieval import RAGRetriever

retriever = RAGRetriever(chroma_client, collection_name="session_123")

# Query for relevant passages
results = retriever.retrieve(
    query="cardiovascular symptoms",
    n_results=5
)

for result in results:
    print(f"Text: {result['text']}")
    print(f"Score: {result['score']}")
    print(f"Offset: {result['start_offset']}-{result['end_offset']}")

Implementation

See rag_retrieval.py.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

55/100Analyzed 2/25/2026

A technically sound skill for hybrid RAG retrieval in clinical notes with clear structure and good code examples, but highly specific to internal implementation with limited reusability. The skill has proper sections and actionable installation steps, but the path and content indicate strong internal-only characteristics.

90
80
35
75
70

Metadata

Licenseunknown
Version-
Updated10/25/2025
PublisherRooseveltAdvisors

Tags

ci-cd