Skip to content

ai-learner

AI learning engine for continuous improvement and performance analysis

Version: 9.0.1 | Size: 2.7MB | Author: Warith Al Maawali warith@digi77.com

License: LicenseRef-Kodachi-SAN-1.0 | Website: https://kodachi.cloud


File Information

Property Value
Binary Name ai-learner
Version 9.0.1
Build Date 2026-02-26T08:01:54.443899302Z
Rust Version 1.82.0
File Size 2.7MB
JSON Data View Raw JSON

SHA256 Checksum

d4b912c97c643f4a8f8cad565f505cf818aa7c882a1b0037139ee6c0cb34e9dc

Features

Feature Description
Feature Feedback aggregation and analysis
Feature Incremental learning with convergence detection
Feature Performance tracking and trend analysis
Feature Multi-format report generation (JSON, Markdown, HTML)

Security Features

Feature Description
Inputvalidation All inputs are validated and sanitized
Ratelimiting Built-in rate limiting for network operations
Authentication Secure authentication with certificate pinning
Encryption TLS 1.3 for all network communications

System Requirements

Requirement Value
OS Linux (Debian-based)
Privileges root/sudo for system operations
Dependencies OpenSSL, libcurl

Global Options

Flag Description
-h, --help Print help information
-v, --version Print version information
-n, --info Display detailed information
-e, --examples Show usage examples
--json Output in JSON format
--json-pretty Pretty-print JSON output with indentation
--json-human Enhanced JSON output with improved formatting (like jq)
--verbose Enable verbose output
--quiet Suppress non-essential output
--no-color Disable colored output
--config <FILE> Use custom configuration file
--timeout <SECS> Set timeout (default: 30)
--retry <COUNT> Retry attempts (default: 3)

Commands

Analysis Operations

analyze

Analyze model performance and trends

Usage:

ai-learner analyze [OPTIONS]

Learning Operations

learn

Run learning cycle to improve model based on feedback

Usage:

ai-learner learn [OPTIONS]

Reporting Operations

report

Generate comprehensive performance reports

Usage:

ai-learner report [OPTIONS]

Status Operations

status

Show ai-learner status, database health, and activity metrics

Usage:

ai-learner status [OPTIONS]

Operational Scenarios

Scenario-oriented workflows generated from the binary's built-in -e --json examples.

Scenario 1: Basic Learning Operations

Run learning cycles and update models based on feedback

Step 1: Run a full learning cycle on all feedback

sudo ai-learner learn
Expected Output: Learning statistics showing improvements

Note

Processes all feedback since last run

Step 2: Run incremental learning on new feedback only

sudo ai-learner learn --incremental
Expected Output: Quick learning update with delta statistics

Step 3: Get learning results in JSON format

sudo ai-learner learn --json
Expected Output: JSON response with detailed learning metrics

Note

Useful for automated processing

Step 4: Learn with custom learning rate

sudo ai-learner learn --learning-rate 0.05
Expected Output: Learning results with adjusted convergence speed

Note

Lower rates for more stable convergence

Step 5: Learn with minimum feedback threshold

sudo ai-learner learn --min-feedback 100
Expected Output: Learning skipped if insufficient feedback available

Note

Ensures statistical significance

Step 6: Incremental learning with JSON output

sudo ai-learner learn --incremental --json
Expected Output: JSON with incremental learning delta statistics

Note

Combines fast incremental mode with structured output

Step 7: Full parameter learning with JSON output

sudo ai-learner learn --learning-rate 0.05 --min-feedback 100 --json
Expected Output: JSON with custom rate and threshold learning metrics

Note

All learning parameters combined for fine-tuned runs

Step 8: Generate signed AI policy file after learning

sudo ai-learner learn --output-policy
Expected Output: Learning cycle + ai-policy.json generated in results/

Note

Policy contains intent thresholds, tool allowlist, risk mode

Step 9: Generate policy with JSON output

sudo ai-learner learn --output-policy --json
Expected Output: JSON learning results + signed policy file written

Note

Policy is signed with SHA-256 HMAC to prevent tampering

Scenario 2: Performance Analysis

Analyze model accuracy and performance trends

Step 1: Analyze performance over the last week

sudo ai-learner analyze --period last-7-days
Expected Output: Accuracy metrics and trend analysis

Step 2: Get accuracy analysis in JSON format

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with per-intent accuracy breakdown

Note

Supports: accuracy, confidence, f1-score

Step 3: Generate learning curve visualization data

sudo ai-learner analyze --learning-curve
Expected Output: Time-series data showing accuracy improvement

Note

Useful for identifying plateaus

Step 4: Analyze confidence metrics

sudo ai-learner analyze --metric confidence
Expected Output: Confidence score distribution and statistics

Note

Shows prediction certainty levels

Step 5: Analyze last 30 days as JSON

sudo ai-learner analyze --period last-30-days --json
Expected Output: JSON with monthly performance trends

Note

Useful for monthly reporting

Step 6: Analyze all-time data

sudo ai-learner analyze --period all-time
Expected Output: Complete historical performance analysis

Note

Shows long-term improvement trends

Step 7: Analyze F1-score metric with JSON output

sudo ai-learner analyze --metric f1-score --json
Expected Output: JSON with F1-score breakdown per intent

Note

F1-score balances precision and recall

Step 8: Learning curve data as JSON

sudo ai-learner analyze --learning-curve --json
Expected Output: JSON time-series of accuracy improvement

Note

Structured data for visualization tools

Scenario 3: AI Tier Performance

Analyze learning metrics per AI engine tier (TF-IDF, ONNX, Mistral.rs, GenAI/Ollama, Legacy LLM, Claude)

Step 1: Show accuracy breakdown across all AI tiers

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with per-tier accuracy metrics

Note

Compares tier performance for optimization decisions

sudo ai-learner analyze --period last-7-days --json
Expected Output: JSON with weekly metrics including new tier data

Note

Tracks mistral.rs and GenAI tier improvement over time

Step 3: ONNX vs LLM routing breakdown

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with fast-path vs slow-path query statistics

Note

Shows what percentage of queries use ONNX fast path vs LLM

Scenario 4: Report Generation

Generate comprehensive reports on learning performance

Step 1: Generate a summary report in JSON format

sudo ai-learner report
Expected Output: JSON report with all performance metrics

Step 2: Generate a Markdown report

sudo ai-learner report --format markdown
Expected Output: Formatted Markdown document with tables and graphs

Note

Great for documentation

Step 3: Generate an HTML report with visualizations

sudo ai-learner report --format html --output results/learning-report.html
Expected Output: Interactive HTML report saved to file

Note

Includes charts and graphs

Step 4: Generate weekly report

sudo ai-learner report --period last-7-days
Expected Output: JSON report covering last 7 days of activity

Note

Useful for weekly reviews

Step 5: Full report in markdown JSON format

sudo ai-learner report --period all-time --format markdown --json
Expected Output: Complete historical report in markdown format as JSON

Note

Combines all-time data with markdown formatting

Step 6: Generate HTML report to file

sudo ai-learner report --format html --output results/report.html
Expected Output: HTML report with charts saved to results/report.html

Note

File output within execution folder

Scenario 5: Integration Workflow

ai-learner commands commonly used alongside training/query cycles

Step 1: Check learner health before running learning jobs

ai-learner status --json
Expected Output: JSON status with metrics and last run timestamps

Note

Recommended first step in automation pipelines

ai-learner analyze --period last-day --json
Expected Output: JSON analysis of recent learner performance

Note

Useful for deciding whether to run learn now

Step 3: Generate weekly markdown report for training review

ai-learner report --period last-7-days --format markdown --json
Expected Output: JSON envelope containing markdown report

Note

Good handoff artifact before ai-trainer operations

Step 4: Run incremental learning with existing feedback

sudo ai-learner learn --incremental
Expected Output: Incremental learning summary and convergence data

Note

Requires authentication

Step 5: Learn and regenerate policy artifacts in one step

sudo ai-learner learn --output-policy --json
Expected Output: JSON with learning results and policy output status

Note

Requires authentication

Step 6: Generate long-range HTML report for model tuning

ai-learner report --period all-time --format html --output results/learning-report.html
Expected Output: HTML report written to results/learning-report.html

Note

Use before planning major trainer updates

Command Examples (Raw)

Basic Learning Operations

Run learning cycles and update models based on feedback

Run a full learning cycle on all feedback

sudo ai-learner learn
Expected Output: Learning statistics showing improvements

Note

Processes all feedback since last run

Run incremental learning on new feedback only

sudo ai-learner learn --incremental
Expected Output: Quick learning update with delta statistics

Get learning results in JSON format

sudo ai-learner learn --json
Expected Output: JSON response with detailed learning metrics

Note

Useful for automated processing

Learn with custom learning rate

sudo ai-learner learn --learning-rate 0.05
Expected Output: Learning results with adjusted convergence speed

Note

Lower rates for more stable convergence

Learn with minimum feedback threshold

sudo ai-learner learn --min-feedback 100
Expected Output: Learning skipped if insufficient feedback available

Note

Ensures statistical significance

Incremental learning with JSON output

sudo ai-learner learn --incremental --json
Expected Output: JSON with incremental learning delta statistics

Note

Combines fast incremental mode with structured output

Full parameter learning with JSON output

sudo ai-learner learn --learning-rate 0.05 --min-feedback 100 --json
Expected Output: JSON with custom rate and threshold learning metrics

Note

All learning parameters combined for fine-tuned runs

Generate signed AI policy file after learning

sudo ai-learner learn --output-policy
Expected Output: Learning cycle + ai-policy.json generated in results/

Note

Policy contains intent thresholds, tool allowlist, risk mode

Generate policy with JSON output

sudo ai-learner learn --output-policy --json
Expected Output: JSON learning results + signed policy file written

Note

Policy is signed with SHA-256 HMAC to prevent tampering

Performance Analysis

Analyze model accuracy and performance trends

Analyze performance over the last week

sudo ai-learner analyze --period last-7-days
Expected Output: Accuracy metrics and trend analysis

Get accuracy analysis in JSON format

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with per-intent accuracy breakdown

Note

Supports: accuracy, confidence, f1-score

Generate learning curve visualization data

sudo ai-learner analyze --learning-curve
Expected Output: Time-series data showing accuracy improvement

Note

Useful for identifying plateaus

Analyze confidence metrics

sudo ai-learner analyze --metric confidence
Expected Output: Confidence score distribution and statistics

Note

Shows prediction certainty levels

Analyze last 30 days as JSON

sudo ai-learner analyze --period last-30-days --json
Expected Output: JSON with monthly performance trends

Note

Useful for monthly reporting

Analyze all-time data

sudo ai-learner analyze --period all-time
Expected Output: Complete historical performance analysis

Note

Shows long-term improvement trends

Analyze F1-score metric with JSON output

sudo ai-learner analyze --metric f1-score --json
Expected Output: JSON with F1-score breakdown per intent

Note

F1-score balances precision and recall

Learning curve data as JSON

sudo ai-learner analyze --learning-curve --json
Expected Output: JSON time-series of accuracy improvement

Note

Structured data for visualization tools

AI Tier Performance

Analyze learning metrics per AI engine tier (TF-IDF, ONNX, Mistral.rs, GenAI/Ollama, Legacy LLM, Claude)

Show accuracy breakdown across all AI tiers

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with per-tier accuracy metrics

Note

Compares tier performance for optimization decisions

Weekly tier performance trends

sudo ai-learner analyze --period last-7-days --json
Expected Output: JSON with weekly metrics including new tier data

Note

Tracks mistral.rs and GenAI tier improvement over time

ONNX vs LLM routing breakdown

sudo ai-learner analyze --metric accuracy --json
Expected Output: JSON with fast-path vs slow-path query statistics

Note

Shows what percentage of queries use ONNX fast path vs LLM

Report Generation

Generate comprehensive reports on learning performance

Generate a summary report in JSON format

sudo ai-learner report
Expected Output: JSON report with all performance metrics

Generate a Markdown report

sudo ai-learner report --format markdown
Expected Output: Formatted Markdown document with tables and graphs

Note

Great for documentation

Generate an HTML report with visualizations

sudo ai-learner report --format html --output results/learning-report.html
Expected Output: Interactive HTML report saved to file

Note

Includes charts and graphs

Generate weekly report

sudo ai-learner report --period last-7-days
Expected Output: JSON report covering last 7 days of activity

Note

Useful for weekly reviews

Full report in markdown JSON format

sudo ai-learner report --period all-time --format markdown --json
Expected Output: Complete historical report in markdown format as JSON

Note

Combines all-time data with markdown formatting

Generate HTML report to file

sudo ai-learner report --format html --output results/report.html
Expected Output: HTML report with charts saved to results/report.html

Note

File output within execution folder

Integration Workflow

ai-learner commands commonly used alongside training/query cycles

Check learner health before running learning jobs

ai-learner status --json
Expected Output: JSON status with metrics and last run timestamps

Note

Recommended first step in automation pipelines

Inspect recent feedback trends before retraining

ai-learner analyze --period last-day --json
Expected Output: JSON analysis of recent learner performance

Note

Useful for deciding whether to run learn now

Generate weekly markdown report for training review

ai-learner report --period last-7-days --format markdown --json
Expected Output: JSON envelope containing markdown report

Note

Good handoff artifact before ai-trainer operations

Run incremental learning with existing feedback

sudo ai-learner learn --incremental
Expected Output: Incremental learning summary and convergence data

Note

Requires authentication

Learn and regenerate policy artifacts in one step

sudo ai-learner learn --output-policy --json
Expected Output: JSON with learning results and policy output status

Note

Requires authentication

Generate long-range HTML report for model tuning

ai-learner report --period all-time --format html --output results/learning-report.html
Expected Output: HTML report written to results/learning-report.html

Note

Use before planning major trainer updates

Environment Variables

Variable Description Default Values
RUST_LOG Set logging level info error
NO_COLOR Disable all colored output when set unset 1

Exit Codes

Code Description
5 File not found
4 Network error
2 Invalid arguments
1 General error
3 Permission denied
0 Success