# Prompts LLM — Pipeline T2A v2 7 prompts externalisés dans `src/prompts/templates.py`, importables via `from src.prompts import ...`. | # | Template | Rôle LLM | Modèle par défaut | Temp. | max_tokens | Variables | Appelant | |---|----------|----------|-------------------|-------|------------|-----------|----------| | 1 | `CODING_CIM10` | coding | gemma3:27b-cloud | 0.1 | 2500 | texte, type_diag, ctx_str, sources_text | `rag_search._build_prompt()` | | 2 | `CODING_CCAM` | coding | gemma3:27b-cloud | 0.1 | 2500 | texte, ctx_str, sources_text | `rag_search._build_prompt_ccam()` | | 3 | `DAS_EXTRACTION` | coding | gemma3:27b-cloud | 0.1 | 2000 | dp_texte, existing_str, ctx_str, text_medical | `rag_search._build_prompt_das_extraction()` | | 4 | `QC_VALIDATION` | qc | gemma3:12b | 0.1 | 2500 | ctx_str, codes_section | `cim10_extractor._validate_justifications()` | | 5 | `CPAM_EXTRACTION` | cpam | deepseek-v3.2:cloud | 0.0 | 1500 | dp_str, das_str, tagged_text, titre, arg_ucr, decision_ucr, dp_ucr_line, da_ucr_line | `cpam_response._extraction_pass()` | | 6 | `CPAM_ARGUMENTATION` | cpam | deepseek-v3.2:cloud | 0.1 | 4000 | dossier_str, asymetrie_str, tagged_str, titre, arg_ucr, decision_ucr, codes_str, definitions_str, sources_text, extraction_str | `cpam_response._build_cpam_prompt()` | | 7 | `CPAM_ADVERSARIAL` | validation | deepseek-v3.2:cloud | 0.0 | 800 | response_json, factual_section, normes_section, dp_ucr_line, da_ucr_line | `cpam_response._validate_adversarial()` | ## Rôles LLM (config.py) ```python OLLAMA_MODELS = { "coding": "gemma3:27b-cloud", # Codage CIM-10/CCAM, extraction DAS "cpam": "deepseek-v3.2:cloud", # Passe 1 extraction + passe 2 argumentation CPAM "validation": "deepseek-v3.2:cloud", # Validation adversariale (DOIT différer du cpam en prod) "qc": "gemma3:12b", # Validation batch justifications, rapide } ``` Surchargeable par env : `T2A_MODEL_CODING`, `T2A_MODEL_CPAM`, `T2A_MODEL_VALIDATION`, `T2A_MODEL_QC`. ## Priorité de résolution du modèle `call_ollama(model=, role=)` : 1. `model` explicite (prioritaire) 2. `get_model(role)` si role fourni 3. `OLLAMA_MODEL` global (fallback)