A standardized schema and repository for storing contextual knowledge across multiple topic domains, with intelligent selection patterns.
Context Hub proposes and demonstrates a universal approach to organizing contextual knowledge in a structured, topic-agnostic format. The goal is to establish consistent metadata schemas and intelligent selection patterns that can be applied across any domain - from prompt engineering to React development to data analysis.
- Universal Metadata: Consistent frontmatter structure that works for any topic
- Rich Semantic Context: Detailed descriptions enabling intelligent context discovery
- Relationship Mapping: Explicit connections between related concepts
- Intelligent Selection: Logical patterns for choosing and combining contexts
context-hub/
├── docs/standards/ # Universal schema and standards
│ ├── context-metadata-schema.md # Core metadata structure
│ └── file-naming-conventions.md # Naming standards
├── contexts/
│ ├── prompt-engineering/ # Domain 1: LLM techniques ✅
│ │ ├── 00-context-selector.md # Intelligent selection logic
│ │ ├── 00-context-selector-patterns.md # Common selection patterns
│ │ ├── 00-context-selector-troubleshooting.md # Issue resolution
│ │ └── [context-modules].md # Individual technique contexts
│ ├── react/ # Domain 2: React development (planned)
│ ├── data-analysis/ # Domain 3: Data analysis (planned)
│ └── [any-topic]/ # Domain N: Any topic area
---
id: "unique-identifier"
title: "Human-Readable Name"
description: "Brief explanation"
category: "domain-specific-category"
tags: ["searchable", "keywords"]
contextual_header: |
Rich semantic description explaining what this context provides,
in which domain it applies, what problems it addresses, when it's
most effective, what it works well with, and what outcomes it produces.
embedding_metadata:
domain: "topic-area"
technique_type: "categorization-within-domain"
complexity_level: "beginner|intermediate|advanced"
primary_use_cases: ["specific-scenarios"]
solves_problems: ["specific-issues"]
works_well_with: ["related-context-ids"]
requires_techniques: ["prerequisite-context-ids"]
conflicts_with: ["incompatible-context-ids"]
---The schema enables logical context selection through:
Relationship-Based Selection:
# Automatic dependency resolution
chain-of-thought:
requires_techniques: ["prompt-engineering-best-practices"]
works_well_with: ["xml-tags-structure", "multishot-examples"]
# Conflict prevention
rapid-response-optimization:
conflicts_with: ["chain-of-thought", "extended-thinking"]Problem-Solution Matching:
# Direct problem targeting
User Problem: "AI responses are inconsistent"
→ Search: solves_problems containing "inconsistent"
→ Found: output-consistency, template-based-prompting
→ Recommend: [output-consistency, prefilling-responses, template-based-prompting]Pattern-Based Selection:
# Common selection patterns
Speed-First: [prompt-engineering-best-practices, clear-direct-prompting]
Accuracy-First: [reduce-hallucinations, chain-of-thought, multishot-examples]
Production-First: [template-based-prompting, output-consistency, prefilling-responses]
Creative-First: [system-prompts-roles, clear-direct-prompting, character-consistency]Schema Applied to 15+ Contexts:
prompt-engineering-best-practices(foundational)chain-of-thought(reasoning)xml-tags-structure(structured)output-consistency(consistency)system-prompts-roles(creative)- [and more...]
Intelligent Selection System:
- Core Selector: Diagnostic questions and selection matrices
- Pattern Library: Common combinations for typical scenarios
- Troubleshooting Guide: Logical approaches for resolving issues
Relationship Mapping:
- Dependencies:
chain-of-thoughtrequiresprompt-engineering-best-practices - Synergies:
xml-tags-structure+chain-of-thought+multishot-examples - Conflicts: Creative techniques vs. rigid consistency controls
Potential contexts following the same schema:
react-component-basics(foundational)state-management-hooks(state)performance-optimization(optimization)component-composition(structured)
Following the same organizational principles:
data-cleaning-fundamentals(foundational)statistical-analysis-methods(analysis)visualization-best-practices(presentation)exploratory-data-analysis(discovery)
Customer Support Bot:
Requirements: Consistent, helpful, brand-appropriate responses
Selection Logic:
1. Base: prompt-engineering-best-practices (always required)
2. Persona: system-prompts-roles (customer service character)
3. Structure: template-based-prompting (consistent responses)
4. Consistency: character-consistency (maintain brand voice)Research Analysis Tool:
Requirements: Accurate, step-by-step analysis with transparency
Selection Logic:
1. Base: prompt-engineering-best-practices
2. Reasoning: chain-of-thought (transparent thinking)
3. Accuracy: reduce-hallucinations (minimize errors)
4. Structure: xml-tags-structure (organized output)API Data Extraction:
Requirements: Reliable JSON output for automated processing
Selection Logic:
1. Base: prompt-engineering-best-practices
2. Format: prefilling-responses (guaranteed JSON)
3. Reliability: output-consistency (stable formatting)
4. Clarity: multishot-examples (format examples)Issue: Inconsistent outputs
Diagnosis: Consistency problem
Solution Path:
1. Add: output-consistency (format control)
2. Consider: template-based-prompting (structure)
3. Check: prefilling-responses (format enforcement)Issue: Poor reasoning quality
Diagnosis: Reasoning problem
Solution Path:
1. Add: chain-of-thought (step-by-step thinking)
2. Support: xml-tags-structure (organize reasoning)
3. Enhance: multishot-examples (show good reasoning)- Same metadata structure works for prompt engineering, React, data analysis
- Predictable organization patterns regardless of topic
- Universal relationship mapping approach
- Rich contextual headers enable natural language search
- Problem-solution mapping connects needs to solutions
- Relationship awareness suggests complementary combinations
- Diagnostic questions guide context choice
- Pattern libraries provide proven combinations
- Troubleshooting approaches resolve common issues
- Easy addition of new topic domains
- Consistent relationship patterns across domains
- Maintains simplicity while enabling intelligence
- Universal Schema Established: Works across any topic domain
- First Domain Complete: 15+ prompt engineering contexts with full metadata
- Intelligent Selection System: Logic-based selection with pattern recognition
- Relationship Mapping: Dependencies, synergies, and conflicts defined
- Repository Architecture: Scalable structure for multi-domain expansion
- Clean, Focused Scope: No complex scoring, simple maintainable approach
- Diagnostic Questions: Guide users to appropriate contexts
- Pattern Recognition: Common selection patterns for typical scenarios
- Problem-Solution Matching: Direct mapping from issues to relevant contexts
- Dependency Resolution: Automatic inclusion of prerequisite contexts
- Conflict Prevention: Avoid incompatible technique combinations
- Troubleshooting Logic: Systematic approaches to resolve issues
- Next Domains: Schema proven and ready for React, data analysis, etc.
- Cross-Domain Validation: Schema universality demonstrated
- Pattern Templates: Selection logic can be adapted to new domains
- Universal Schema Definition: Metadata structure that works for any domain
- Intelligent Selection Patterns: Logical approaches to context combination
- Reference Implementation: Working examples in prompt engineering
- Relationship Framework: Systematic approach to context connections
- Cross-Domain Standards: Consistent organization principles
- Complex performance metrics or scoring systems
- Automated validation tools or management utilities
- Token cost analysis or optimization algorithms
- Search interfaces or discovery applications
Focus: Schema definition, intelligent selection logic, and cross-domain demonstration
- Study the Schema: Review
docs/standards/context-metadata-schema.md - Examine Examples: Browse
contexts/prompt-engineering/to see schema in action - Understand Selection: Review
00-context-selector.mdfor intelligent selection logic - Explore Patterns: Check
00-context-selector-patterns.mdfor common combinations
- Apply Schema: Use the universal metadata structure
- Create Contexts: Individual modules following the schema
- Map Relationships: Define dependencies, synergies, conflicts
- Develop Selection Logic: Adapt diagnostic questions and patterns for your domain
# Problem-driven selection
"Need accurate analysis" → [reduce-hallucinations, chain-of-thought, multishot-examples]
"Want consistent output" → [template-based-prompting, output-consistency, prefilling-responses]
"Handle complex tasks" → [prompt-chaining, xml-tags-structure, chain-of-thought]
# Pattern-based selection
Speed-First: Minimal contexts for quick results
Accuracy-First: Maximum reliability for critical applications
Production-First: Consistency and scalability for systems
Creative-First: Originality with brand consistencyContext Hub aims to establish a universal standard for contextual knowledge storage and intelligent selection that:
- Scales Across Any Domain: Same schema and selection logic for technical, creative, analytical topics
- Enables Intelligent Discovery: Rich metadata supports natural language search and logical selection
- Supports Systematic Organization: Predictable structure and relationship patterns
- Facilitates Knowledge Reuse: Standardized format enables broader application
- Maintains Simplicity: Human-maintainable approach without complex automation
The schema-first approach with intelligent selection logic ensures that knowledge can be organized consistently and discovered intelligently, whether it's about React components, data analysis techniques, or any other topic area.
- Follow the universal metadata structure in
docs/standards/context-metadata-schema.md - Include rich contextual headers with semantic descriptions
- Map relationships to related contexts (dependencies, synergies, conflicts)
- Use consistent file naming conventions
- Develop diagnostic questions for your domain
- Create common selection patterns
- Document troubleshooting approaches
- Test context combinations for effectiveness
This repository demonstrates that a well-designed schema combined with intelligent selection logic can provide both structure and discoverability for contextual knowledge across any domain.