|
| 1 | +# Advanced Configuration |
| 2 | + |
| 3 | +## Model Selection |
| 4 | + |
| 5 | +### OpenAI Models (recommended) |
| 6 | + |
| 7 | +| Model | Speed | Quality | Cost (per 1M tokens) | Notes | |
| 8 | +|-------|-------|---------|---------------------|-------| |
| 9 | +| `gpt-5.4-mini` | Fast | Very Good | $0.75 / $4.50 | **Default**, best balance for fact-checking | |
| 10 | +| `gpt-5.4` | Medium | Excellent | $2.50 / $15.00 | Flagship, 33% fewer factual errors vs 5.2 | |
| 11 | +| `gpt-5.4-nano` | Very Fast | Good | $0.20 / $1.25 | Budget option for simple claims | |
| 12 | +| `o3` | Slow | Best reasoning | $2.00 / $8.00 | Best for complex multi-step verification | |
| 13 | +| `o4-mini` | Medium | Good reasoning | $1.10 / $4.40 | Budget reasoning model | |
| 14 | + |
| 15 | +### Alternative Providers (via OPENAI_BASE_URL) |
| 16 | + |
| 17 | +| Model | Provider | Cost (per 1M tokens) | Notes | |
| 18 | +|-------|----------|---------------------|-------| |
| 19 | +| `deepseek-chat` | DeepSeek | $0.14 / $0.28 | Very cheap, good quality, tool use supported | |
| 20 | +| `gemini-2.5-flash` | Google (via proxy) | $0.30 / $2.50 | Fast, 1M context, requires OpenAI-compatible proxy | |
| 21 | +| Custom model | Self-hosted | Varies | Set via `OPENAI_BASE_URL` | |
| 22 | + |
| 23 | +Override model: `--model gpt-5.4` or `export OPENAI_MODEL=gpt-5.4` |
| 24 | + |
| 25 | +### Model Selection Guide |
| 26 | + |
| 27 | +- **Quick demo**: `gpt-5.4-nano` or `deepseek-chat` (fastest, cheapest) |
| 28 | +- **Standard use**: `gpt-5.4-mini` (default, best balance) |
| 29 | +- **High accuracy**: `gpt-5.4` (flagship, fewer factual errors) |
| 30 | +- **Complex reasoning**: `o3` (best for institutional/attribution claims) |
| 31 | + |
| 32 | +## Claim Types |
| 33 | + |
| 34 | +ArticleFactChecker recognizes 8 claim types: |
| 35 | + |
| 36 | +| Type | Description | Example | |
| 37 | +|------|-------------|---------| |
| 38 | +| `factual` | General factual statements | "Python was created in 1991" | |
| 39 | +| `statistical` | Numbers, percentages, metrics | "GPT-4 achieves 86.4% on MMLU" | |
| 40 | +| `attribution` | Who said/did what | "Elon Musk announced..." | |
| 41 | +| `institutional` | Organization affiliations | "Released by Tsinghua University" | |
| 42 | +| `temporal` | Dates and timelines | "Launched on December 5, 2024" | |
| 43 | +| `comparative` | Comparisons between entities | "Faster than GPT-3.5" | |
| 44 | +| `monetary` | Financial figures | "Raised $100M in Series B" | |
| 45 | +| `technical` | Technical specs and capabilities | "Supports 128K context window" | |
| 46 | + |
| 47 | +## Tuning Parameters |
| 48 | + |
| 49 | +### `--max-claims N` (default: 50) |
| 50 | + |
| 51 | +Controls how many claims are extracted from the article. |
| 52 | + |
| 53 | +- **10-20**: Quick scan, good for short articles or demos |
| 54 | +- **30-50**: Standard, covers most article claims |
| 55 | +- **50+**: Thorough, may increase execution time significantly |
| 56 | + |
| 57 | +### `--max-concurrent N` (default: 5) |
| 58 | + |
| 59 | +Controls parallel claim verification. |
| 60 | + |
| 61 | +- **1-3**: Conservative, avoids API rate limits |
| 62 | +- **5**: Default balance of speed and reliability |
| 63 | +- **10**: Fast but may hit rate limits on some APIs |
| 64 | + |
| 65 | +## Environment Variables |
| 66 | + |
| 67 | +| Variable | Required | Default | Description | |
| 68 | +|----------|----------|---------|-------------| |
| 69 | +| `OPENAI_API_KEY` | Yes | - | API key for LLM calls | |
| 70 | +| `OPENAI_BASE_URL` | No | `https://api.openai.com/v1` | Custom API endpoint | |
| 71 | +| `OPENAI_MODEL` | No | `gpt-5.4-mini` | Default model | |
| 72 | +| `TAVILY_API_KEY` | No | - | Enables web search verification | |
| 73 | + |
| 74 | +## Output Artifacts |
| 75 | + |
| 76 | +Dingo saves detailed output to `outputs/<timestamp>/`: |
| 77 | + |
| 78 | +| File | Content | |
| 79 | +|------|---------| |
| 80 | +| `summary.json` | Overall evaluation statistics | |
| 81 | +| `content/QUALITY_BAD_*.jsonl` | Per-item results grouped by error type | |
| 82 | + |
| 83 | +ArticleFactChecker also saves intermediate artifacts: |
| 84 | + |
| 85 | +| File | Content | |
| 86 | +|------|---------| |
| 87 | +| `article_content.md` | Original article text | |
| 88 | +| `claims_extracted.jsonl` | Extracted claims (one per line) | |
| 89 | +| `claims_verification.jsonl` | Per-claim verification details | |
| 90 | +| `verification_report.json` | Full structured verification report | |
| 91 | + |
| 92 | +## Troubleshooting |
| 93 | + |
| 94 | +| Problem | Solution | |
| 95 | +|---------|----------| |
| 96 | +| "Dingo SDK not installed" | `pip install -e .` from project root | |
| 97 | +| "LangChain not installed" | `pip install -r requirements/agent.txt` | |
| 98 | +| Timeout errors | Use `--model gpt-5.4-mini` and `--max-claims 20` | |
| 99 | +| Rate limit errors | Reduce `--max-concurrent` to 2-3 | |
| 100 | +| Empty results | Check that article has verifiable factual claims | |
0 commit comments