Semantic Search & RAG Architecture

Semantic Search & RAG Architecture is a skill for Claude Code, Codex from GuitarAlchemist/ga. It costs 33 tokens per session (779 once invoked), scanned A, original, MIT.

A set of design rules for semantic search, which finds results by meaning, and RAG, a method that retrieves relevant documents before generating an answer. It covers how text is converted into searchable number patterns and stored.

In plain words
What is it for?
Use it when building or changing AI search, document retrieval, vector indexes, or answer generation in Guitar Alchemist.
Why use it?
It prevents different parts of the search system from using incompatible data. Consistent conversion and document IDs keep existing search indexes usable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or changing AI search, document retrieval, vector indexes, or answer generation in Guitar Alchemist.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guitaralchemist/ga/semantic-rag-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add GuitarAlchemist/ga --skill semantic-rag-architecture
Clone the repo
git clone --depth 1 https://github.com/GuitarAlchemist/ga

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Semantic Search & RAG Architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/guitaralchemist/ga/semantic-rag-architecture/github.svg)](https://agentmods.dev/skills/guitaralchemist/ga/semantic-rag-architecture)
Your own site
<a href="https://agentmods.dev/skills/guitaralchemist/ga/semantic-rag-architecture"><img src="https://agentmods.dev/badge/skills/guitaralchemist/ga/semantic-rag-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Semantic Search & RAG Architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/guitaralchemist/ga/semantic-rag-architecture"><img src="https://agentmods.dev/badge/skills/guitaralchemist/ga/semantic-rag-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00779
Opus 5 $0.00016 $0.00390
Sonnet 5 $0.00007 $0.00156
Haiku 4.5 $0.00003 $0.00078

Measured 10d ago against content hash b2d73c7ad767, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Semantic Search & RAG Architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/semantic-rag-architecture/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semantic Search & RAG Architecture

This skill governs the development of AI search capabilities, specifically within GA.Business.ML and the Common/GA.Domain.Services/Fretboard/Voicings search namespaces. It ensures that our vector search infrastructure remains consistent, deterministic, and high-performance.

1. Embedding Fundamentals

1.1 Model Standard

  • Provider: ONNX Runtime.
  • Model: all-MiniLM-L6-v2 (Quantized).
  • Dimensions: 384 (Fixed).
  • Constraint: Never change the embedding model or dimension count without a coordinated full-system re-index. Doing so will break all existing vector search features.

1.2 Schema Governance

  • Use the OPTIC-K Schema Guardian skill for specific weighting and dimension mapping rules. This skill focuses on the architecture around those embeddings.

2. Indexing Strategy

2.1 Deterministic Identity

Document IDs in the vector store must be deterministic and reproducible from the domain entity itself. Never use random UUIDs for domain entities.

  • Format: entity_type_discriminator
  • Example (Voicing): voicing_standard_0_x_3_2_0_1_0 (tuning + capo + fret diagram)

2.2 Document Payloads (Metadata)

  • Searchable Text: Must be a natural language representation of the entity (e.g., "C Major 7 open chord high comfort").
  • Facets: Store filtering fields (Difficulty, HandStretch, OmittedTones) as raw types (int, bool, string[]) in the payload to enable hybrid search (Vector + Filter).

3. RAG Pipeline & Orchestration

3.1 Retrieval Hierarchy

When assembling context for LLMs (e.g., Chatbot):

  1. Direct Match: Exact entity lookups (by name or text).
  2. Semantic Match: Vector neighbors (Top-K).
  3. Theoretical Context: Related keys/scales derived from the retrieved entities.

3.2 Context Window Management

  • Token Budget: 4096 tokens (typical local model).
  • Priority: System Prompt > User Query > Retrieved Voicings > Theoretical Rules.
  • Truncation: Truncate the least relevant distinct search results first, preserving the highest-scored matches.

Read the full file on GitHub · 62 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 62 lines · 33 tokens per session scan A b2d73c7ad767

Subscribe to this mod's changes

Semantic Search & RAG Architecture is a skill published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 779 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens