Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pilotrag

Latest version: v0.1.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: praveen9392
0 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

pilotrag was last scanned on 29 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 0.1.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 29 Nov 2026 No rules fired

No rules fired in 0.1.0

Findings

Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

PilotRAG

Markdown-first, local-first Retrieval-Augmented Generation for Python.

Point PilotRAG at a folder of Markdown files, build a local search index once, and ask questions that are answered only from those files, with source references. Embeddings run locally through Hugging Face sentence-transformers, answers come from a local Ollama model, and the index is a local Chroma directory, so nothing leaves your machine and no API key is needed. It is a library first (a thin CLI is included); every component can be replaced without touching your application code.

How it works

PilotRAG has two separate phases. Asking a question never re-embeds your documents: only the question itself is embedded.

Phase 1: build the index (only when you run pilotrag ingest)

  1. Find files: scan the docs folder for .md files. Hidden files, files over the size limit and files with other extensions are never discovered (they are not counted anywhere); the report's skipped count covers discovered files that no loader handles.
  2. Read: extract the text, the frontmatter (e.g. team: platform) and the title.
  3. Chunk: split each file into pieces of about 1000 characters at headings and paragraphs, with 200 characters of overlap.
  4. Embed: the Hugging Face model turns every chunk into a vector (384 numbers that capture its meaning). This is the slow part.
  5. Save: store chunks and vectors in a new Chroma index under .pilotrag/index/.
  6. Swap: when the new index is complete, the CURRENT pointer switches to it and the old one is removed. If anything failed, the old index stays in use.

Phase 2: answer a question (every pilotrag query / rag.query())

  1. Open the saved index from disk; documents are not re-read or re-embedded.
  2. Embed the question only (one short text, milliseconds).
  3. Search for the chunks whose vectors are closest to the question (top 5 by default).
  4. Check evidence: if nothing is retrieved (or, when you set retrieval.min_score, everything scores below it), reply "not enough information" without calling the LLM.
  5. Ask the LLM (Ollama) with the question plus those chunks, instructed to answer only from them and to say when they are insufficient.
  6. Return the answer with its sources (file, heading, score, snippet).
INGEST (when you run it):  docs/*.md -> chunks -> embeddings -> saved index
QUERY  (every question):   question -> embedding -> search saved index -> LLM -> answer + sources

The index does not update by itself: nothing watches your files and nothing runs on a schedule. When documents change, run pilotrag ingest again, by hand or on a schedule (see Keep the index up to date).

Features

  • Local and free by default: Hugging Face embeddings, Ollama chat, Chroma storage, no accounts or API keys.
  • Grounded answers with sources: every Answer lists the files, headings, scores and snippets of the chunks given to the model. When nothing relevant is found (no chunks retrieved, or all below retrieval.min_score) you get status="insufficient_evidence" and no LLM call. By default min_score is unset, so a non-empty index always returns top_k chunks and the model itself is instructed to say when the context does not answer the question.
  • Safe index updates: each ingest builds a new index generation and swaps it in atomically; a failed run leaves the previous index queryable.
  • Compatibility checks: the index records which embedding model and chunker built it, and queries refuse a mismatched index instead of returning wrong results.
  • Metadata filters: restrict a query to documents whose frontmatter matches.
  • Typed errors with hints: every failure has a stable code and a fix.
  • Extensible and testable: plugin entry points, deterministic fakes and contract test suites.

Step-by-step guide

Commands are shown for Windows PowerShell; macOS/Linux differences are noted.

Step 1: Install the prerequisites (once)
  1. Python 3.10 - 3.13: check with python --version.

  2. Ollama (generates the answers): install from https://ollama.com/download and make sure it is running (it starts automatically on Windows/macOS; on Linux run ollama serve).

  3. Pull a chat model:

    ollama pull qwen2.5:0.5b

    This one is small and fast. For better answers use a larger model such as qwen2.5:3b or llama3.2:3b and set llm.model accordingly.

Step 2: Create a project and install PilotRAG
mkdir my-kb
cd my-kb
python -m venv .venv
.venv\Scripts\activate          # macOS/Linux: source .venv/bin/activate
pip install "pilotrag[local]"
pilotrag --version              # verify the install

local = Hugging Face embeddings + Ollama client + Chroma. It pulls in PyTorch, so the first install is large. Smaller installs: pilotrag[huggingface], pilotrag[ollama], pilotrag[chroma]; plain pip install pilotrag is the core only (bring your own providers or use the shipped test fakes).

To install from a local checkout of this repository instead of PyPI:

pip install "C:/path/to/pilot-rag[local]"
Step 3: Add your documents
mkdir docs

Put your .md files in docs/ (subfolders are fine). Optionally add frontmatter at the top of a file so you can filter on it later:

---
team: platform
---
# Deploy process

Deploys happen every Tuesday at 10am UTC.
Step 4: Write the config file

Create pilotrag.yaml in my-kb/:

version: 1
documents:
  path: ./docs
  on_error: skip            # skip unreadable files instead of stopping the run
chunking:
  strategy: recursive_markdown
  size: 1000
  overlap: 200
embeddings:
  provider: huggingface
  model: BAAI/bge-small-en-v1.5
llm:
  provider: ollama
  model: qwen2.5:0.5b
vector_store:
  provider: chroma
  path: ./.pilotrag/index
retrieval:
  strategy: dense
  top_k: 5

Relative paths are resolved from the folder you run the command in, not from the config file's location. ./docs and ./.pilotrag/index above work when you run pilotrag from my-kb/. If you run it from elsewhere (for example a scheduler), either cd into the project folder first or use absolute paths.

Step 5: Build the index
pilotrag ingest
  • The first run downloads the embedding model (about 130 MB) to your Hugging Face cache; later runs reuse it.
  • The output shows documents discovered/processed/skipped, chunks indexed and Status: success.
  • Preview without embedding or writing anything: pilotrag ingest --dry-run.
Step 6: Ask questions
pilotrag query "When do deploys happen?"
pilotrag query "When do deploys happen?" --top-k 3

You get the answer plus the source files and headings it used. The model is instructed to answer only from the retrieved chunks and to say when they do not contain the answer (small models may still guess). To make weak matches count as "no evidence" (status="insufficient_evidence", no LLM call), set retrieval.min_score (for example 0.5; tune it per embedding model).

Step 7: Use it from Python (your application)
import asyncio

from pilotrag import RAG
from pilotrag.core.types import MetadataFilter

with RAG.from_config("pilotrag.yaml") as rag:        # closes resources on exit
    answer = rag.query("When do deploys happen?")     # Answer
    print(answer.text)
    for source in answer.sources:                     # SourceReference
        print(source.relative_path, source.heading_path, source.score)

    if answer.status == "insufficient_evidence":
        print("Not in the docs.")

    # Only search documents whose frontmatter has `team: platform`
    scoped = rag.query(
        "Deploy steps?",
        filters=MetadataFilter(equalities={"team": "platform"}),
    )

    # Async twin for async apps (e.g. FastAPI): runs on a worker thread
    later = asyncio.run(rag.aquery("What is the rate limit?"))

Your application should only query. Build the index separately (Step 5 or Step 8), not before every question. Ingesting from Python is also possible:

with RAG.from_config("pilotrag.yaml") as rag:
    report = rag.ingest()                 # IngestionReport
    print(report.status, report.chunks_indexed, report.skipped)

Also available: RAG.from_mapping({...}), RAG.from_settings(settings), rag.validate(), rag.ingest(dry_run=True). Full reference: docs/api-reference/overview.md.

Step 8: Keep the index up to date

Whenever your documents change, run pilotrag ingest again. It builds a fresh index and swaps it in safely; a lock file prevents two ingests from overlapping. To automate it:

  • Windows Task Scheduler (daily at 02:00; use /sc hourly instead of /sc daily /st 02:00 for every hour). Scheduled tasks start in C:\Windows\System32, so the task changes into the project folder first (relative paths in the config resolve from there):

    schtasks /create /tn "pilotrag-ingest" /sc daily /st 02:00 /tr "cmd /c cd /d C:\path\to\my-kb && .venv\Scripts\pilotrag.exe ingest"
  • macOS/Linux cron (every hour):

    0 * * * * cd /path/to/my-kb && .venv/bin/pilotrag ingest
  • On every new build or deploy: add pilotrag ingest -c pilotrag.yaml as a step in your CI/CD pipeline.

Current limitations to plan around:

  • Every ingest re-embeds all documents, even unchanged ones (no incremental ingestion yet).
  • A long-running application keeps using the index it already opened; restart it (or create a new RAG object) after a scheduled ingest to pick up the new index.
Step 9: If something goes wrong
Problem Fix
Error [index_not_found] Run pilotrag ingest first
Error [index_incompatible] You changed the embedding model or chunking settings: run pilotrag ingest again
Error [provider_unavailable] (Ollama) Start Ollama (ollama serve) and check llm.base_url
Error [provider_response] 404 The model is not pulled: ollama pull <model>
Error [missing_extra] pip install "pilotrag[local]"
Embedding model download fails The first run needs internet; afterwards you can set HF_HUB_OFFLINE=1. See troubleshooting
Weak or off-topic answers Use a larger chat model, or set retrieval.min_score: 0.5 to drop weak matches

More: docs/operations/troubleshooting.md. Known limitations: docs/releases/known-issues.md.

Configuration summary

Required sections: documents, chunking, embeddings, llm, vector_store. version is optional and defaults to 1 (setting it is recommended). Every key is validated; unknown keys and bad values are reported together with their paths. Relative paths resolve from the current working directory.

Section Key options (defaults)
documents path, extensions ([".md"]), follow_symlinks (false), include_hidden (false), max_file_size_mb (5), on_error (fail or skip)
chunking strategy: recursive_markdown, size (1000), overlap (200)
embeddings provider: huggingface (default) or ollama; model, batch_size, device, ...
llm provider: ollama, model, temperature (0.0), timeout_s (120), base_url
vector_store provider: chroma, path (./.pilotrag/index), collection
retrieval strategy: dense, top_k (5), min_score (null, range -1..1)
generation insufficient_evidence_message, max_context_chunks (8)
logging level, format (text or json), redact

Override any value with PILOTRAG__SECTION__KEY environment variables or ${ENV} references. Complete reference: docs/development/configuration.md.

CLI reference

pilotrag --version
pilotrag ingest [--config/-c PATH] [--dry-run]
pilotrag query QUESTION [--config/-c PATH] [--top-k N]
Option Default Meaning
--config, -c pilotrag.yaml Config file
--dry-run (ingest) off Plan only; nothing embedded or written
--top-k (query) config value Chunks to retrieve
Exit code Meaning
0 Success
1 Failure (see Error [code] / Hint: on stderr)
2 Invalid configuration or usage
3 Ingest finished with some files failed (on_error: skip)

Choosing an embedding model

The default is BAAI/bge-small-en-v1.5 (384 dimensions, MIT license), a strong small English model that runs on CPU. For an even smaller model use sentence-transformers/all-MiniLM-L6-v2; any sentence-transformers model id works. Use device: cuda or mps for acceleration, query_instruction for models that need a query prefix, and HF_HOME / HF_HUB_OFFLINE=1 to control the model cache and network use. Ollama embeddings (provider: ollama) remain available.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases pilotrag

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229