How to use from
Docker Model Runner
docker model run hf.co/edgeimpulse/edgeimpulse-api-docs-rag
Quick Links

Edge Impulse API Docs β€” RAG Assistant

A focused retrieval-augmented assistant for the Edge Impulse API reference (Studio API, ingestion API, remote-management API). Same runtime as the full edgeimpulse/edgeimpulse-docs-rag assistant, but the knowledge base is restricted to the API documentation so retrieval stays tightly on-topic for integration and automation questions.

  • Scope: Edge Impulse API reference only (apis, apis_studio, apis_ingestion, apis_remote-management).
  • Retrieval: FAISS (inner-product) over data/index, embedded with sentence-transformers/all-MiniLM-L6-v2 (384-dim).
  • Generation: edgeimpulse/edgeimpulse-docs-qwen-0.5b via any OpenAI-compatible endpoint (llama.cpp or Ollama).

This repo ships only the prebuilt (API-scoped) index and the inference code β€” no raw corpus and no index-building pipeline.

Contents

File Purpose
data/index/edge_impulse_docs.faiss FAISS index of the API-reference chunks
data/index/chunks.pkl Chunk text + source metadata (aligned to the index)
data/index/metadata.json Embedding model + index parameters (scope: edge-impulse-api-reference)
rag.py Retrieval + grounded generation (CLI + importable)
serve.py Minimal Flask HTTP API (POST /ask)
requirements.txt Runtime dependencies

Quickstart

pip install -r requirements.txt
hf download edgeimpulse/edgeimpulse-api-docs-rag --local-dir edgeimpulse-api-docs-rag
cd edgeimpulse-api-docs-rag

# start the generator (llama.cpp)
hf download edgeimpulse/edgeimpulse-docs-qwen-0.5b qwen-edgeai-q4_k_m.gguf --local-dir .
llama-server -m qwen-edgeai-q4_k_m.gguf -c 4096 --port 8080 --jinja

# ask an API question
python rag.py "How do I create an Edge Impulse API key?"
python rag.py "How do I upload data with the ingestion API?" --no-generate

Serve over HTTP:

python serve.py --host 0.0.0.0 --port 8000
curl -s localhost:8000/ask -H 'content-type: application/json' \
  -d '{"question": "How do I classify an image via the API?"}'

Configuration

rag.py honours RAG_INDEX_DIR, RAG_API_BASE, and RAG_MODEL (see the full assistant's card for details). For Ollama:

export RAG_API_BASE=http://127.0.0.1:11434/v1
export RAG_MODEL=hf.co/edgeimpulse/edgeimpulse-docs-qwen-0.5b

Notes

Because the corpus is intentionally narrow, questions outside the API reference may return "not in context" β€” that is by design. For general docs questions (devices, deployment targets, ML concepts) use the full edgeimpulse/edgeimpulse-docs-rag assistant instead.

License

Apache-2.0. Documentation content belongs to Edge Impulse.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for edgeimpulse/edgeimpulse-api-docs-rag