You're offline — showing cached data
B BibaMoneypowered by AI OS

How AI OS Works

Architecture, routing algorithms, enrichment freshness, RAG retrieval, and trading strategy selection — what happens under the hood.

01

Architecture Pipeline

Five external data sources feed an enrichment pipeline. The processed stream passes through an LLM router and a vector RAG store before reaching three consumers: the public portal, the admin dashboard, and the MCP server.

Data Sources Processing Output Data Sources CoinGecko CoinPaprika RSS Feeds Gate.io Newsadmin Enrichment Pipeline LLM Router 5 backends RAG Store LanceDB Portal-Go Public UI Dashboard Admin UI MCP Server 17 tools
02

LLM Routing Algorithm

Each task is first classified by type, then dispatched to the backend that maximises quality per unit cost and latency. Fast drafts go to Groq; structured extraction and reasoning to OpenAI; bulk jobs to Runpod; embeddings and free-tier work to Ollama.

Task → backend dispatch table

SEO_DRAFT Groq fast, cheap
CLASSIFY Groq fast, cheap
EXTRACT OpenAI structured output
REASONING OpenAI quality
CRITIQUE OpenAI quality
PLAN OpenAI quality
BATCH Runpod custom models
LOCAL_GEN Ollama free
EMBEDDING Ollama 768d vectors

Cost-optimisation formula

cost(task, backend)    = price_per_token × estimated_tokens(task)
latency(task, backend) = base_latency + tokens / throughput
quality(task, backend) = exam_score(backend, task_type)

route(task) = argmax( quality / (cost × √latency) )
03

Enrichment Freshness Algorithm

Every enrichment cron is benchmarked against its expected interval and a hard SLA. Health degrades through three zones as elapsed time grows — OK → degraded → critical.

OK
degraded
critical
t = 0 1.5 × expected SLA
health(cron) =
  1   if last_run_age < 1.5 × expected_interval   → OK
  0.5 if last_run_age < SLA                        → degraded
  0   otherwise                                     → critical
04

Agent Effectiveness Scoring

Agent performance is measured on five axes and collapsed to a single effectiveness score E via a complexity-weighted mean. Heavier tasks contribute proportionally more to the final score.

Speed Cost Quality Safety Learning
E = Σ(wᵢ × scoreᵢ) / Σ(wᵢ)

where:
  wᵢ      = complexity weight of task i
  scoreᵢ  = outcome score (0 – 100)

Axes (5 dimensions):
  Speed    — task latency vs budget
  Cost     — tokens × price per token
  Quality  — exam score on task type
  Safety   — guardrail pass rate
  Learning — hint reuse in context pack
05

RAG Retrieval Algorithm

Each query is embedded into a 768-dimensional vector, matched against LanceDB chunks by cosine similarity, re-ranked by recency decay, and packed into the model's context window.

query → embed(query) → cosine_similarity(query_vec, chunk_vecs)
      → top-K chunks → rerank by recency
      → context_pack → inject into prompt
06

Trading Strategy Selection Matrix

GOGA classifies the current market regime from real-time signals and selects the appropriate execution strategy. Each row maps a detected condition to its indicator set and the action taken.

Condition Indicators Strategy
Pump Entry 1mΔ>0.5%, Vol<2, Book>1.5 Vector/Shot
Dip Buy RSI<30, 15mΔ<-2% DCA Grid
Swing Hold PumpQ>60, Funding<0 Pattern/Adaptive
Avoid VolRatio>3, RSI>80 Wait