Skip to main content

Knowledge engineering system — transforms LLMs into deterministic Obsidian file generators

Project description

AI Knowledge Filler

Transform any LLM into a deterministic knowledge base generator

Tests Lint Validate PyPI Python 3.10+ License: MIT Coverage Pylint


Problem → Solution

Problem: LLMs generate inconsistent, unstructured responses that require manual formatting.

Solution: System prompt that transforms any LLM into a deterministic file generator — same input, same structure, every time.

Result: Production-ready Markdown files with validated YAML metadata. Zero manual post-processing.


⚡ Quick Start (60 seconds)

Option 1: pip install (Recommended)

pip install ai-knowledge-filler

# Set at least one API key
export ANTHROPIC_API_KEY="sk-ant-..."  # or GOOGLE_API_KEY, OPENAI_API_KEY

# Generate
akf generate "Create Docker security checklist"

Output: outputs/Docker_Security_Checklist.md — production-ready, validated.

Option 2: Claude Projects (No CLI)

1. Open Claude.ai → Create new Project
2. Project Knowledge → Upload Core_System/System_Prompt_AI_Knowledge_Filler.md
3. Custom Instructions → Paste Core_System/Custom_Instructions.md
4. Prompt: "Create guide on API authentication"
5. Done. Claude generates structured files.

What You Get

Core System (6 files)

  • System Prompt — Transforms LLM from chat to file generator
  • Metadata Standard — YAML structure specification
  • Domain Taxonomy — 30+ classification domains
  • Update Protocol — File merge rules
  • Validation Script — Automated quality gates
  • CLI — Multi-LLM interface (Claude, Gemini, GPT-4, Ollama)

Quality Assurance

  • ✅ 96% test coverage (82 tests)
  • ✅ Automated YAML validation
  • ✅ CI/CD pipelines (GitHub Actions)
  • ✅ Type hints (100% coverage)
  • ✅ Linting (Pylint 9.55/10)

CLI Commands

Generate Files

# Auto-select first available LLM
akf generate "Create Kubernetes deployment guide"

# Specific model
akf generate "Create API checklist" --model claude
akf generate "Create Docker guide" --model gemini
akf generate "Create REST concept" --model gpt4
akf generate "Create microservices reference" --model ollama

Validate Files

# Single file
akf validate --file outputs/Guide.md

# All files in outputs/
akf validate

List Available Models

akf models

# Output:
# ✅ claude     Claude (Anthropic) — claude-sonnet-4-20250514
# ✅ gemini     Gemini (Google) — gemini-2.0-flash
# ❌ gpt4       GPT-4 (OpenAI) — Set OPENAI_API_KEY
# ✅ ollama     Ollama (llama3.2:3b)

Example Output

Input:

Create guide on API rate limiting

Output:

---
title: "API Rate Limiting Strategy"
type: guide
domain: api-design
level: intermediate
status: active
version: v1.0
tags: [api, rate-limiting, performance]
related:
  - "[[API Design Principles]]"
  - "[[System Scalability]]"
created: 2026-02-12
updated: 2026-02-12
---

## Purpose
Comprehensive strategy for implementing API rate limits...

## Core Principles
[Structured content with sections, code examples]

## Implementation
[Step-by-step technical guidance]

## Conclusion
[Summary and next steps]

Every file. Same structure. Validated automatically.


Architecture

User Prompt
    ↓
System Prompt (behavior definition)
    ↓
LLM Provider (Claude/Gemini/GPT-4/Ollama)
    ↓
Structured Markdown + YAML
    ↓
Automated Validation
    ↓
Production-Ready File

Key Insight: System prompt is the source of truth. Same prompt works across all LLMs.


Model Selection

Model Speed Cost Best For
Claude Medium $$$ Technical docs, architecture
Gemini Fast $ Quick drafts, summaries
GPT-4 Slow $$$$ Versatile content
Ollama Very Fast Free Privacy, offline, local

Auto-selection: CLI tries providers in order: Claude → Gemini → GPT-4 → Ollama (first available).


Installation

Via pip (Recommended)

pip install ai-knowledge-filler

From Source

git clone https://github.com/petrnzrnk-creator/ai-knowledge-filler.git
cd ai-knowledge-filler
pip install -r requirements.txt

API Keys

# Set at least one
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="AIza..."
export OPENAI_API_KEY="sk-..."

# Or create .env file
cat > .env << 'EOF'
ANTHROPIC_API_KEY=your-key-here
GOOGLE_API_KEY=your-key-here
EOF

Testing

# Run all tests
pytest --cov=. --cov-report=term-missing -v

# Run validation
akf validate

# Run linting
pylint *.py tests/

Coverage: 96% (82 tests) Linting: Pylint 9.55/10 CI/CD: All checks passing


Use Cases

1. Technical Documentation Generate API docs, architecture decisions, deployment guides.

2. Knowledge Management Structure meeting notes, research findings, learning content.

3. Consulting Deliverables Create frameworks, methodologies, client reports.

4. Batch Processing Generate multiple files programmatically via CLI or API.

Full examples: Use_Cases_Documentation.md


File Types

type: concept      # Theoretical entity, definition
type: guide        # Step-by-step process
type: reference    # Specification, standard
type: checklist    # Validation criteria
type: project      # Project description
type: template     # Reusable template

30+ domains: api-design, system-design, devops, security, data-engineering, etc.

See Domain_Taxonomy.md for complete list.


Documentation

Core System

Guides


Advanced Usage

Programmatic Generation

from llm_providers import get_provider

# Auto-select provider
provider = get_provider("auto")

# Load system prompt
with open('Core_System/System_Prompt_AI_Knowledge_Filler.md') as f:
    system_prompt = f.read()

# Generate
content = provider.generate(
    prompt="Create API security checklist",
    system_prompt=system_prompt
)

# Save
with open('outputs/Security_Checklist.md', 'w') as f:
    f.write(content)

Batch Processing

cat > topics.txt << 'EOF'
Docker deployment best practices
Kubernetes security hardening
API authentication strategies
EOF

while read topic; do
    akf generate "Create guide on $topic" --model gemini
done < topics.txt

Validation

Automated checks:

  • ✅ YAML frontmatter present
  • ✅ Required fields (title, type, domain, level, status, created, updated)
  • ✅ Valid enum values (type, level, status)
  • ✅ Domain in taxonomy
  • ✅ ISO 8601 dates (YYYY-MM-DD)
  • ✅ Tags array (3+ items)

Output:

✅ outputs/Guide.md
❌ drafts/incomplete.md
   ERROR: Missing field: domain
   ERROR: Invalid type: document

Roadmap

v0.1.x ✅ (Current)

  • System Prompt (universal LLM compatibility)
  • YAML Metadata Standard
  • Domain Taxonomy (30+ domains)
  • Validation Script (96% test coverage, 82 tests)
  • Multi-LLM CLI (Claude, Gemini, GPT-4, Ollama)
  • CI/CD Pipelines (GitHub Actions)
  • PyPI package (pip install ai-knowledge-filler)

v0.2.x (Next)

  • Obsidian vault auto-routing
  • Local model support (llama.cpp endpoint)
  • Enhanced documentation
  • VSCode extension (YAML validation)

License

MIT License — Free for commercial and personal use.


Philosophy

This is knowledge engineering, not chat enhancement.

LLMs are deterministic infrastructure, not conversational toys.

Before: "AI helps me write notes" After: "AI compiles my knowledge base"


Created by: Petr — AI Solutions Architect PyPI: https://pypi.org/project/ai-knowledge-filler/ Repository: https://github.com/petrnzrnk-creator/ai-knowledge-filler Version: 0.1.2


Support


Quick Links: Quick Start | CLI Commands | Documentation | Examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_knowledge_filler-0.1.3.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_knowledge_filler-0.1.3-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file ai_knowledge_filler-0.1.3.tar.gz.

File metadata

  • Download URL: ai_knowledge_filler-0.1.3.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ai_knowledge_filler-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d329cb5128d3942a2dbd4609bb82eb2028073aeebc3450fc3c46e9feee8c54d7
MD5 b4f78d5a09a80e756fc84350cbac06e1
BLAKE2b-256 dcb95c38e0b322ddab26fce4b8a871d292f8da63e6210c079b60162704179265

See more details on using hashes here.

File details

Details for the file ai_knowledge_filler-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_knowledge_filler-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7acce14de24bb1b748b6daedbbcf48b9bd476b506cefe761a3c1ad1b6010c731
MD5 034ad823868f8e48e2bacaaaf4ee0a3c
BLAKE2b-256 4e0944829b02bf28f76dbe7bde10c388277344b00f16127168be9be782137452

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page