Skip to content

DOCUMENTATION_SUMMARY

Nick edited this page Mar 10, 2026 · 1 revision

PATAS Documentation - Complete Index

Navigation through all PATAS documentation


Main Files

📄 Home (6.8KB) — main page

  • Project overview
  • Quick start
  • Key features
  • API endpoints (9)
  • CLI commands (7)
  • Architecture
  • Configuration

For Developers

📘 API Reference Full (15KB) — complete API documentation

  • All 9 endpoints with detailed examples
  • Request/response models
  • Error handling
  • Examples (Python, cURL, JavaScript)
  • Rate limiting
  • Versioning

📗 API Quickstart (4.4KB) — quick start (5 minutes)

  • Main endpoint /api/v1/analyze
  • Basic examples
  • Pattern groups and SQL output
  • Lower-level endpoints
  • Request limits

📙 Examples (12KB) — practical code examples

  • Basic usage
  • Advanced patterns
  • Error handling
  • Async processing
  • CLI examples
  • Best practices

📕 Architecture Full (13KB) — architecture

  • Data models (Message, Pattern, Rule, RuleEvaluation)
  • Core services (15+)
  • Data flow
  • Extension points
  • Security

📓 Integration Guide (9.6KB) — integration guide

  • Step-by-step integration
  • Integration patterns (batch, continuous, real-time)
  • Performance optimization
  • Monitoring
  • Best practices

📔 Configuration Guide (5.4KB) — configuration

  • All environment variables
  • Aggressiveness profiles (conservative/balanced/aggressive)
  • Privacy modes (STANDARD/STRICT)
  • LLM configuration
  • Semantic mining settings
  • Production recommendations

General Documents

📖 Overview Public (5.0KB) — overview

  • What PATAS solves
  • How it works
  • Key features
  • Typical use cases
  • What PATAS detects

📚 Use Cases (5.7KB) — use case scenarios

  • Moderation team with growing workload
  • Platform with manual rules
  • Team with LLM integration
  • Multi-language spam
  • And other scenarios

🎮 CLI Demo — simplified CLI demo

  • Educational toy version
  • Installation from GitHub Release
  • Basic usage examples
  • Comparison with real PATAS Core
  • ⚠️ Not for production use

📖 Demo Guide (5.6KB) — full demo guide

  • Prerequisites
  • Installation
  • Starting API server
  • Running demo
  • Viewing results

🔧 Troubleshooting (8.3KB) — troubleshooting

  • API issues
  • Pattern mining issues
  • Rule issues
  • LLM issues
  • Database issues
  • Configuration issues
  • Performance issues

Specialized Topics

🧠 Semantic Pattern Mining (6.6KB) — semantic mining

  • Problem with keyword-based detection
  • Solution through semantic similarity
  • Examples
  • Implementation
  • Configuration

SQL LLM Validation (5.8KB) — LLM rule validation

  • Why LLM validation is needed
  • How it works
  • Token optimization
  • Usage
  • Best practices

🎯 Pattern Quality Testing (4.4KB) — pattern quality

  • Problem with false positives
  • Pattern Quality Filters
  • Testing
  • Test dataset
  • Manual review

🎨 Positioning (7.0KB) — product positioning

  • What is PATAS
  • What PATAS is NOT
  • How teams solve this without PATAS
  • Where PATAS fits in your stack
  • Why transparent rules matter

Navigation by Role

For Developers (integration)

  1. Start with API Quickstart
  2. Study Examples
  3. Read API Reference Full
  4. Follow Integration Guide
  5. Configure via Configuration Guide

For Architects

  1. Read Architecture Full
  2. Study Overview Public
  3. Check Positioning
  4. Review Extension Points

For Operators

  1. Start with Configuration Guide
  2. Study Troubleshooting
  3. Read Integration Guide (monitoring)
  4. Review Pattern Quality Testing

For Researchers

  1. Study Semantic Pattern Mining
  2. Read SQL LLM Validation
  3. Review Architecture Full
  4. Check Use Cases

Reference Tables

API Endpoints

Endpoint Method Description
/api/v1/health GET Health check
/api/v1/messages/ingest POST Message ingestion
/api/v1/patterns/mine POST Run pattern mining
/api/v1/patterns GET List patterns
/api/v1/rules GET List rules
/api/v1/rules/eval-shadow POST Evaluate shadow rules
/api/v1/rules/promote POST Promotion/deprecation
/api/v1/rules/export GET Export rules
/api/v1/analyze POST Batch analysis ⭐

CLI Commands

Command Description
patas ingest-logs Ingest from external API/storage
patas mine-patterns Run pattern mining
patas eval-rules Evaluate shadow rules
patas promote-rules Promotion and monitoring
patas safety-eval Safety evaluation
patas demo-telegram Demo for Telegram engineers
patas explain-rule Rule explanation

Aggressiveness Profiles

Profile min_precision max_coverage max_ham_hits Usage
conservative 0.95 0.05 5 Production auto-actions
balanced 0.90 0.10 10 Signals and research (default)
aggressive 0.85 0.20 20 Signals only, not hard bans

Pattern Types

Type Description
URL URL patterns
PHONE Phone number patterns
TEXT Text patterns
META Metadata patterns
SIGNATURE Message signature patterns
KEYWORD Keyword patterns

Rule Statuses

Status Description
CANDIDATE New rule created by pattern mining
SHADOW Rule in shadow evaluation
ACTIVE Active rule, ready for export
DEPRECATED Deprecated rule

Quick Reference

Quick start

# 1. Start API
poetry run uvicorn app.api.main:app --host 0.0.0.0 --port 8000

# 2. Send request
curl -X POST http://localhost:8000/api/v1/analyze \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"id": "1", "text": "spam", "is_spam": true}], "run_mining": true}'

Main settings

AGGRESSIVENESS_PROFILE=balanced
LLM_PROVIDER=openai  # or none
ENABLE_SEMANTIC_MINING=true
PRIVACY_MODE=STANDARD

Useful Links


Documentation Statistics

  • Total pages: 15
  • Total size: ~120KB
  • Based on: Real PATAS Core v2 code
  • Examples: Tested on real API
  • Last updated: 2025-01-16

All documents are based on real code, not on outdated documentation.

Clone this wiki locally