# Knowledge Base: Agent 1 — The Autonomous Prospector

> **Grounding Context Document**: Upload to ChatGPT Custom GPT Knowledge, Gemini Gem Context, or Claude Project Knowledge.

---

## 1. Entity Resolution Dictionary

Map corporate names, ticker aliases, and product names to standardized CIK Entity IDs:

| Input Text Variations | Ticker | CIK Entity ID | Company Name |
| :--- | :--- | :--- | :--- |
| `Apex`, `Apex Tech`, `APEX`, `Apex Corp` | `APEX` | `0001854910` | Apex Technologies Corp |
| `Meta`, `Facebook`, `FB`, `Meta Platforms` | `META` | `0001326801` | Meta Platforms, Inc. |
| `Nexa`, `Nexa Health`, `NEXA` | `NEXA` | `0001923481` | Nexa Health Systems |
| `Orbital`, `Orbital Dynamics`, `ORBT` | `ORBT` | `0001748291` | Orbital Dynamics Inc |

---

## 2. FinBERT Domain Sentiment & Contextual Nuance Rules

Generic LLMs misclassify specialized financial vocabulary. Enforce these FinBERT domain sentiment rules:

| Financial Text Phrase | Telecom / Tech Context | Retail / Industrial Context | Sentiment Classification |
| :--- | :--- | :--- | :--- |
| *"Churn is up significantly"* | Customer Loss ↑ | N/A | **NEGATIVE (-0.92)** |
| *"Impairment charge taken"* | Asset Write-down | Asset Write-down | **NEGATIVE (-0.88)** |
| *"Cost reduction initiative"* | Margin Expansion | Restructuring Risk | **POSITIVE / NEUTRAL (+0.45)** |
| *"CapEx scaled back"* | Cash Preservation | Growth Bottleneck | **NEUTRAL (+0.10)** |

---

## 3. Swarm Pattern Execution & Parallel Fan-Out Architecture

When a parallel sweep query is received:
1. **Fan-out Sub-Agent 1 (SEC Reader)**: Parse Form 10-K / 10-Q overlapping chunks.
2. **Fan-out Sub-Agent 2 (DB Interrogator)**: Execute NL-to-SQL over `portfolio_companies` and `earnings_reports`.
3. **Fan-out Sub-Agent 3 (Alpha Scraper)**: Pull `ALT-JOB-01` (Hiring Velocity) and `ALT-PRIC-04` (Pricing Index).
4. **Synthesis Engine**: Combine outputs into 1 unified intelligence brief.

---

## 4. Production Database Schema Reference
```sql
CREATE TABLE portfolio_companies (
    id INTEGER PRIMARY KEY,
    ticker VARCHAR(10) UNIQUE,
    company_name VARCHAR(255),
    sector VARCHAR(100),
    cik_id VARCHAR(10)
);

CREATE TABLE earnings_reports (
    id INTEGER PRIMARY KEY,
    company_id INTEGER REFERENCES portfolio_companies(id),
    fiscal_year INTEGER,
    fiscal_quarter VARCHAR(10),
    revenue_actual DECIMAL(15,2),
    revenue_estimate DECIMAL(15,2),
    eps_actual DECIMAL(10,4),
    eps_estimate DECIMAL(10,4)
);

CREATE TABLE guidance_updates (
    id INTEGER PRIMARY KEY,
    company_id INTEGER REFERENCES portfolio_companies(id),
    fiscal_year INTEGER,
    fiscal_quarter VARCHAR(10),
    revenue_guidance_status VARCHAR(20) -- 'RAISED', 'MAINTAINED', 'LOWERED'
);
```
