mcpbeat Sign in

RAG Skill

Retrieve information from simulator manual and example DATA files. Use when answering keyword format questions, syntax queries, or when looking up official documentation and working examples. Essential for understanding keyword definitions, parameter tables, and concrete usage patterns.

15k tokens
context cost
the whole folder, loaded on every use
12
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
4138
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/NVIDIA/GenerativeAIExamples --skill rag_skill

What comes with it

53 228 bytes besides the instruction
__init__.py
assets/README.md
references/TOOL_DECISION_TREE.md
scripts/__init__.py
scripts/extract_capitalized_words.py
scripts/extract_keyword.py
scripts/nvidia_embedding.py
scripts/nvidia_reranker.py
scripts/query_milvus_with_filters.py
scripts/rag_chain.py
test.py

The instruction itself

11 sections, as written by the author

RAG (Retrieval-Augmented Generation) Skill

This skill provides retrieval tools for accessing simulator documentation and example files through vector search.

Overview

The RAG skill enables agents to:

  • Retrieve official simulator manual documentation for keyword definitions and syntax
  • Retrieve example DATA files and case studies for concrete usage patterns
  • Answer keyword format questions with authoritative sources
  • Provide working examples to illustrate keyword usage

Tools

simulator_manual

Retrieves information from the simulator manual and official documentation using semantic search.

Usage:

simulator_manual(query: str) -> str

Parameters:

  • query: Natural language query about keywords, syntax, or documentation (e.g., "COMPDAT keyword format", "WELSPECS syntax and fields")

Example:

simulator_manual("What is the COMPDAT keyword format?")

Returns: Retrieved documentation snippets from the simulator manual with source citations.

When to use:

  • First step in keyword Q&A flow (TOOL_DECISION_TREE.md Section 2.5)
  • In scenario test chain after parse_simulation_input_file (Section 2.4) to get keyword context
  • When user asks about keyword definitions, syntax, or parameter tables

simulator_examples

Retrieves example DATA files and case studies using semantic search.

Usage:

simulator_examples(query: str) -> str

Parameters:

  • query: Natural language query about keyword examples or usage patterns (e.g., "COMPDAT keyword format", "WCONINJE injection rate examples")

Example:

simulator_examples("COMPDAT keyword format")

Returns: Retrieved example DATA file snippets showing concrete keyword usage.

When to use:

  • After simulator_manual when manual lacks format details or examples (Section 2.5)
  • In scenario test chain after simulator_manual to get example context for modifications (Section 2.4)
  • When user needs working examples to understand keyword syntax

Workflow Integration

This skill integrates with the Simulator Agent's decision tree (TOOL_DECISION_TREE.md):

  • Keyword Q&A Flow (Section 2.5):
   simulator_manual → (simulator_examples) → answer
  • Scenario Test Chain (Section 2.4):
   parse_simulation_input_file → simulator_manual (inferred keyword) → simulator_examples (same keyword) → modify_simulation_input_file → run_and_heal
  • Keyword Chain (Section 3.4):
   simulator_manual → simulator_examples → synthesize format + example → final answer

Implementation Details

Tools are implemented as LangChain retriever tools with:

  • Vector store: Milvus containing embedded simulator manual and examples
  • Embeddings: NVIDIA embedding API for semantic search
  • Top-k retrieval: Configurable number of relevant chunks returned (default: 10, reranked to 5)
  • Source citation: Metadata includes source file paths and section references

extract_keyword (internal helper)

scripts/extract_keyword.py provides RAG + LLM keyword extraction (e.g. "plot field oil" → FOPT). Used by plot_skill validators and other skills that need to infer keywords from natural language.

from simulator_agent.skills.rag_skill.scripts.extract_keyword import extract_keyword

kw = extract_keyword("plot field cumulative oil production", intent="summary_metric")  # -> "FOPT"

Best Practices

  • Always cite sources: Include manual section names and example file paths in responses
  • Use simulator_manual first: It's the authoritative source for syntax and fields
  • Use simulator_examples for illustration: Examples show concrete usage but should not override manual definitions
  • Handle conflicts: If examples conflict with manual, prefer manual and explain the conflict

References

  • Tool Decision Tree - Routing logic
  • OPM Flow Manual - Manual structure and indexing

Configuration

RAG tools use Milvus collections created by ./scripts/setup.sh --full:

| Tool name | Milvus collection | Ingested by |

|---------------------|---------------------------|--------------------------------|

| simulator_manual | docs | ingest_papers.sh |

| simulator_examples| simulator_input_examples| ingest_opm_examples.py |

Environment variables:

  • MILVUS_URI: Milvus endpoint (default: http://localhost:19530; Docker: http://standalone:19530)
  • NVIDIA_API_KEY: Required for embeddings, reranker, and LLM

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Geo Database
by christophacham
×4

Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.

12k tokens
Pymc Bayesian Modeling
by christophacham
×4

Bayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.

24k tokens scripts
Pymoo
by christophacham
×4

Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.

19k tokens scripts
Statsmodels
by ComeOnOliver
×4

Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.

41k tokens
Add Uint Support
by pytorch
vendor ×3

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

2k tokens
At Dispatch V2
by pytorch
vendor ×3

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

2k tokens
Docstring
by pytorch
vendor ×3

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

3k tokens

How to use it

Copy the folder

Take nvidia/rag_skill from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.