docs: update data-pipeline.md and llm-setup.md to reflect sqlite architecture

This commit is contained in:
lila 2026-05-02 20:13:05 +02:00
parent ccfd83d16c
commit 6007fe1e38
2 changed files with 175 additions and 157 deletions

View file

@ -7,6 +7,14 @@ and production scripts.
---
## Provider model
Each provider + model combination counts as one vote in the final majority.
Running the same model twice is not supported — one model, one vote. To
increase vote confidence, add more models rather than re-running existing ones.
---
## Hardware (dev machine)
| Component | Spec |
@ -190,16 +198,17 @@ Set `Authorization: Bearer <OPENROUTER_API_KEY>` in the request headers.
---
## Provider configuration in the test script
## Provider configuration in the enrich script
The enrich test script reads a single config object. To switch providers,
change this object and re-run.
The enrich script reads a single config object. To switch providers,
change this object and re-run. The `name` field is used as the model
identifier in `pipeline.db` — it must be unique across all runs.
```typescript
// config.ts
export type ProviderConfig = {
name: string; // used for output folder naming
name: string; // used as model identifier in pipeline.db — must be unique
baseURL: string;
apiKey: string;
model: string;
@ -243,14 +252,9 @@ export const ANTHROPIC_SONNET: ProviderConfig = {
};
```
Output from each run lands in:
```
stage-3-enrich/test/output/{provider.name}/results.json
stage-3-enrich/test/output/{provider.name}/metrics.json
```
The evaluate script compares all `metrics.json` files side by side.
All output is written to `pipeline.db`. Each record is stored with the
model name as identifier so results from different providers can be
compared and compiled into votes.
---
@ -297,5 +301,6 @@ The test script measures the following per provider run:
production. If not, use the cloud model that passed.
5. **Production run**
Full 117k records. Resume-safe — the script checkpoints after each
record so overnight runs can be stopped and continued.
Full 117k records. Resume-safe — each record is written to `pipeline.db`
atomically as it is processed. Overnight runs can be stopped and
continued at any time without losing work.