src/llm/SKILL.md
GNN LLM-enhanced analysis and model interpretation. Use when generating natural language descriptions of GNN models, getting AI-assisted model explanations, or performing LLM-powered analysis of Active Inference specifications.
npx skillsauth add activeinferenceinstitute/generalizednotationnotation gnn-llm-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides LLM-enhanced analysis of GNN models including natural language interpretation, model summarization, structural analysis, and AI-assisted insights using multiple provider backends.
# Run LLM analysis
python src/13_llm.py --target-dir input/gnn_files --output-dir output --verbose
# As part of pipeline
python src/main.py --only-steps 13 --verbose
The LLM module supports multiple providers with automatic recovery:
from llm import (
process_llm, LLMProcessor, LLMAnalyzer,
analyze_gnn_file_with_llm, extract_variables, extract_connections,
perform_semantic_analysis, generate_model_insights,
generate_documentation, generate_llm_summary,
get_available_providers, get_module_info
)
# Process LLM step (used by pipeline)
process_llm(target_dir, output_dir, verbose=True)
# Use the LLMProcessor class
processor = LLMProcessor()
result = processor.analyze(gnn_content)
description = processor.generate_description(gnn_content)
# Use the LLMAnalyzer class
analyzer = LLMAnalyzer()
insights = analyzer.analyze_content(gnn_content)
# Analyze a file with LLM
result = await analyze_gnn_file_with_llm(content)
# Extract model components
variables = extract_variables(content)
connections = extract_connections(content)
# Check available providers
providers = get_available_providers() # e.g., ['ollama', 'openai']
LLMProcessor — class with analyze(), analyze_model(), generate_description()LLMAnalyzer — class with analyze_content(), extract_insights()analyze_gnn_file_with_llm — async full analysisextract_variables, extract_connections, extract_sections — component extractiongenerate_model_insights, generate_documentation, generate_llm_summaryUnifiedLLMProcessor, AnalysisType, ProviderType — advanced provider API# LLM PyPI packages are core dependencies (uv sync)
uv sync
# Optional: uv sync --extra llm (compatibility; same pins)
# Install Ollama CLI separately for local inference: https://ollama.com
output/13_llm_output/This module registers tools with the GNN MCP server (see mcp.py):
process_llmanalyze_gnn_with_llmgenerate_llm_documentationdevelopment
GNN static HTML website generation from pipeline artifacts. Use when generating browsable documentation websites, creating HTML galleries of model visualizations, or publishing pipeline results as a static site.
data-ai
GNN graph and matrix visualization generation. Use when creating network graph plots, matrix heatmaps, state space diagrams, or other visual representations of GNN models.
testing
GNN advanced validation and consistency checking. Use when performing deep validation of GNN models, checking cross-model consistency, verifying structural integrity, or running validation reports.
tools
GNN shared utility functions and helper modules. Use when working with common pipeline utilities, logging helpers, file I/O wrappers, path management, or pipeline template infrastructure.