From somtech-rag
Connaissances sur le Somtech RAG Service — indexation de documents, recherche sémantique, génération de réponses sourcées. Utiliser quand on travaille avec le RAG Service, qu'on cherche comment l'appeler, comment déboguer, ou comment il cohabite avec Somcraft. TRIGGERS : RAG, document_chunks, rag_search, rag_push_document, hybrid search, embeddings, pgvector, somtech-rag-service, RagClient
How this skill is triggered — by the user, by Claude, or both
Slash command
/somtech-rag:ragThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Le **Somtech RAG Service** est un service d'infrastructure qui permet à n'importe quel projet Somtech (Somcraft, Orbit, Cowork, agents Claude Code) d'interroger la base documentaire d'un client et d'obtenir des réponses sourcées.
Le Somtech RAG Service est un service d'infrastructure qui permet à n'importe quel projet Somtech (Somcraft, Orbit, Cowork, agents Claude Code) d'interroger la base documentaire d'un client et d'obtenir des réponses sourcées.
Ce qu'il fait :
Ce qu'il n'est pas :
Stack : Fly.io, Node.js/TypeScript, Express, LangChain.js, pgvector, OpenAI embeddings, Claude pour la génération.
Pattern : une instance Fly.io par client × environnement.
Naming : rag-<client>-<env> où env ∈ {dev, staging, prod}.
Chaque instance :
tenant_id — isolation par instance, pas par colonneExemple pour le client acme :
rag-acme-dev → Supabase acme-dev
rag-acme-staging → Supabase acme-staging
rag-acme-prod → Supabase acme-prod
Les instances sont déployées via /deploy-rag qui provisionne tout automatiquement.
RAG.md à la racine du projet client — ce fichier est généré par /deploy-rag et contient un tableau avec toutes les URLs par environnement.fly apps list --org somtech | grep rag-<client>Ne jamais deviner l'URL — toujours vérifier qu'elle existe.
Le RAG et Somcraft sont complémentaires, pas redondants.
| Somcraft | RAG Service |
|---|---|
| Interface documentaire | Service d'indexation + recherche |
| Conversion PDF → Markdown | Chunking + embeddings |
| Édition, validation, versionnage | Hybrid search + génération |
| Stockage des fichiers originaux | Stockage des chunks vectorisés |
Flux d'un document : Somcraft convertit le PDF en .md → l'utilisateur clique "Pousser au RAG" → Somcraft appelle l'API REST du RAG Service → le RAG chunke, embed, et stocke → met à jour documents.rag_status = 'indexed'.
Colonnes de Somcraft liées au RAG (sur la table documents) :
rag_status — null | rag_ready | indexing | indexed | outdatedrag_version, rag_indexed_at, rag_chunk_count, rag_notesLes détails approfondis sont dans les fichiers de référence :
references/api-usage.md — Comment appeler le RAG (REST, MCP, client SDK TypeScript) avec exemples completsreferences/troubleshooting.md — Debug, seuils de confiance, erreurs courantesreferences/when-to-use.md — Quand utiliser le RAG vs Somcraft vs DB directe vs Claude directRègle d'or : ne jamais croiser les environnements.
| Contexte | Utiliser |
|---|---|
| Développement local | rag-<client>-dev |
| Staging / QA | rag-<client>-staging |
| Production | rag-<client>-prod |
Un frontend en dev appelle un RAG en dev. Un frontend en prod appelle un RAG en prod. Jamais l'inverse.
npx claudepluginhub somtechsolutionmaxime/somtech-pack --plugin somtech-ragProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.