Product UI redesign (light) + disable API key for public demo
Browse files- static/index.html +136 -180
static/index.html
CHANGED
|
@@ -3,245 +3,201 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
-
<title>Corrective RAG
|
| 7 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 8 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 9 |
-
<link href="https://fonts.googleapis.com/css2?family=
|
| 10 |
<link rel="stylesheet" href="/static/styles.css" />
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
-
<div class="
|
| 14 |
|
| 15 |
-
<
|
| 16 |
<div class="brand">
|
| 17 |
-
<
|
| 18 |
-
<
|
| 19 |
-
<div class="brand-title">Corrective RAG</div>
|
| 20 |
-
<div class="brand-subtitle">Data Assistant</div>
|
| 21 |
-
</div>
|
| 22 |
</div>
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
<button class="
|
| 26 |
-
|
| 27 |
-
Assistant
|
| 28 |
-
</button>
|
| 29 |
-
<button class="nav-item" data-view="metrics" type="button">
|
| 30 |
-
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 19V11M12 19V5M19 19v-6"/></svg>
|
| 31 |
-
Évaluation
|
| 32 |
-
</button>
|
| 33 |
-
<button class="nav-item" data-view="about" type="button">
|
| 34 |
-
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8.5"/><path d="M12 16v-4M12 8.2h.01"/></svg>
|
| 35 |
-
Architecture
|
| 36 |
-
</button>
|
| 37 |
</nav>
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
<
|
| 41 |
-
<span class="dot" id="status-dot"></span>
|
| 42 |
-
<span id="status-text">Connexion…</span>
|
| 43 |
-
</div>
|
| 44 |
-
<div class="model-chip" id="model-chip">deepseek-ai/DeepSeek-V4.1-Flash</div>
|
| 45 |
</div>
|
| 46 |
-
</
|
| 47 |
|
| 48 |
-
<main class="
|
| 49 |
|
| 50 |
<section class="view" id="view-chat">
|
| 51 |
-
<
|
| 52 |
-
<
|
| 53 |
-
<h1>Assistant d'analyse documentaire</h1>
|
| 54 |
<p>
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
refuse plutôt que d'inventer.
|
| 58 |
</p>
|
| 59 |
-
</
|
| 60 |
|
| 61 |
-
<div class="chat-
|
| 62 |
-
<div class="
|
| 63 |
-
<div class="
|
| 64 |
-
<div class="
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
Je n'invente jamais de réponse quand les documents disponibles
|
| 69 |
-
ne suffisent pas.
|
| 70 |
-
</div>
|
| 71 |
</div>
|
| 72 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
<form class="composer" id="composer">
|
| 75 |
<input
|
| 76 |
type="text"
|
| 77 |
id="question-input"
|
| 78 |
-
placeholder="
|
| 79 |
autocomplete="off"
|
| 80 |
/>
|
| 81 |
-
<button type="submit" id="send-btn"
|
| 82 |
-
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 12h15M14 6l6 6-6 6"/></svg>
|
| 83 |
-
</button>
|
| 84 |
</form>
|
| 85 |
</div>
|
|
|
|
| 86 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
<
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
</p>
|
| 95 |
</div>
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
<
|
| 99 |
-
|
| 100 |
-
<li class="empty">Aucune requête pour l'instant.</li>
|
| 101 |
</ul>
|
| 102 |
</div>
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
<
|
| 106 |
-
|
| 107 |
-
<p class="empty">—</p>
|
| 108 |
-
</div>
|
| 109 |
-
</div>
|
| 110 |
-
|
| 111 |
-
<div class="context-block">
|
| 112 |
-
<div class="context-label">Trace du pipeline</div>
|
| 113 |
-
<ol class="trace-list" id="trace-list">
|
| 114 |
-
<li class="empty">—</li>
|
| 115 |
</ol>
|
| 116 |
</div>
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
<
|
| 120 |
-
|
| 121 |
-
<
|
| 122 |
-
<
|
| 123 |
-
<
|
| 124 |
-
|
| 125 |
-
</div>
|
| 126 |
</div>
|
| 127 |
-
</
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
<div class="suggestions" aria-label="Exemples">
|
| 131 |
-
<button class="suggestion-chip" type="button" data-q="Quel est le délai de remboursement pour un client professionnel ?">Délai remboursement B2B</button>
|
| 132 |
-
<button class="suggestion-chip" type="button" data-q="Quelle est la politique de retour pour les clients entreprise ?">Politique retour entreprise</button>
|
| 133 |
-
<button class="suggestion-chip" type="button" data-q="Quel client a le meilleur chiffre d'affaires en juin ?">Meilleur CA en juin</button>
|
| 134 |
-
<button class="suggestion-chip" type="button" data-q="Quel sera le chiffre d'affaires le mois prochain ?">Question hors périmètre</button>
|
| 135 |
-
</div>
|
| 136 |
</section>
|
| 137 |
|
| 138 |
<section class="view hidden" id="view-metrics">
|
| 139 |
-
<
|
| 140 |
-
<
|
| 141 |
-
<h1>Métriques d'évaluation</h1>
|
| 142 |
<p>
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
<code>eval/evaluate.py</code>.
|
| 146 |
</p>
|
| 147 |
-
</
|
| 148 |
|
| 149 |
-
<div id="metrics-empty" class="empty-
|
| 150 |
-
<p>
|
| 151 |
-
<code>python eval/evaluate.py</code>
|
| 152 |
</div>
|
| 153 |
|
| 154 |
<div id="metrics-content" class="hidden">
|
| 155 |
-
<
|
| 156 |
-
<span id="metrics-n">
|
| 157 |
-
<span id="metrics-generated">
|
| 158 |
-
</
|
| 159 |
-
|
| 160 |
-
<div class="
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
<th>Définition</th>
|
| 173 |
-
<th>RAG classique</th>
|
| 174 |
-
<th>Corrective RAG</th>
|
| 175 |
-
<th>Δ</th>
|
| 176 |
-
</tr>
|
| 177 |
-
</thead>
|
| 178 |
-
<tbody id="metrics-tbody"></tbody>
|
| 179 |
-
</table>
|
| 180 |
-
</div>
|
| 181 |
-
</div>
|
| 182 |
-
|
| 183 |
-
<div class="metrics-section">
|
| 184 |
-
<div class="section-head">
|
| 185 |
-
<h2>Profil de performance</h2>
|
| 186 |
-
<p>Barres côte à côte pour lire rapidement les écarts.</p>
|
| 187 |
-
</div>
|
| 188 |
-
<div class="compare-legend">
|
| 189 |
-
<span><i class="swatch classic"></i> RAG classique</span>
|
| 190 |
-
<span><i class="swatch crag"></i> Corrective RAG</span>
|
| 191 |
-
</div>
|
| 192 |
-
<div class="compare-rows" id="compare-rows"></div>
|
| 193 |
</div>
|
| 194 |
-
|
| 195 |
-
<p class="
|
| 196 |
</div>
|
| 197 |
</section>
|
| 198 |
|
| 199 |
<section class="view hidden" id="view-about">
|
| 200 |
-
<
|
| 201 |
-
<
|
| 202 |
-
<h1>Architecture du pipeline</h1>
|
| 203 |
<p>
|
| 204 |
-
|
| 205 |
-
|
| 206 |
</p>
|
| 207 |
-
</
|
| 208 |
|
| 209 |
-
<
|
| 210 |
-
<
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
<div class="pipe-branch correct">
|
| 216 |
-
<div class="pipe-branch-title">CORRECT</div>
|
| 217 |
-
<p>Filtrage des chunks parasites → génération sourcée</p>
|
| 218 |
</div>
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
</div>
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
</div>
|
| 227 |
-
</
|
| 228 |
-
<
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
-
<
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
SQLite (<code>data/database/company.db</code>) avec validateur SELECT
|
| 238 |
-
only — module <code>app/sql/</code>. Embeddings via fastembed (ONNX).
|
| 239 |
-
</div>
|
| 240 |
</section>
|
| 241 |
|
| 242 |
</main>
|
| 243 |
</div>
|
| 244 |
-
|
| 245 |
<script src="/static/app.js"></script>
|
| 246 |
</body>
|
| 247 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>Corrective RAG</title>
|
| 7 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 8 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap" rel="stylesheet" />
|
| 10 |
<link rel="stylesheet" href="/static/styles.css" />
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
+
<div class="page">
|
| 14 |
|
| 15 |
+
<header class="topbar">
|
| 16 |
<div class="brand">
|
| 17 |
+
<span class="brand-mark">CR</span>
|
| 18 |
+
<span class="brand-name">Corrective RAG</span>
|
|
|
|
|
|
|
|
|
|
| 19 |
</div>
|
| 20 |
+
<nav class="tabs" aria-label="Sections">
|
| 21 |
+
<button class="tab active" data-view="chat" type="button">Assistant</button>
|
| 22 |
+
<button class="tab" data-view="metrics" type="button">Résultats</button>
|
| 23 |
+
<button class="tab" data-view="about" type="button">Comment ça marche</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
</nav>
|
| 25 |
+
<div class="top-status">
|
| 26 |
+
<span class="dot" id="status-dot"></span>
|
| 27 |
+
<span id="status-text">Connexion…</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
</div>
|
| 29 |
+
</header>
|
| 30 |
|
| 31 |
+
<main class="content">
|
| 32 |
|
| 33 |
<section class="view" id="view-chat">
|
| 34 |
+
<div class="intro">
|
| 35 |
+
<h1>Posez une question.<br />Réponse seulement si les preuves tiennent.</h1>
|
|
|
|
| 36 |
<p>
|
| 37 |
+
Politiques, FAQ, ventes. Le pipeline corrige la recherche avant
|
| 38 |
+
de répondre — ou refuse proprement.
|
|
|
|
| 39 |
</p>
|
| 40 |
+
</div>
|
| 41 |
|
| 42 |
+
<div class="chat-stage">
|
| 43 |
+
<div class="messages" id="messages">
|
| 44 |
+
<div class="message assistant">
|
| 45 |
+
<div class="bubble">
|
| 46 |
+
Bonjour. Essayez une question sur le remboursement, la
|
| 47 |
+
livraison, ou les ventes. Si les documents ne suffisent pas,
|
| 48 |
+
je le dirai clairement.
|
|
|
|
|
|
|
|
|
|
| 49 |
</div>
|
| 50 |
</div>
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
<div class="prompt-row">
|
| 54 |
+
<div class="suggestions" aria-label="Exemples">
|
| 55 |
+
<button class="suggestion" type="button" data-q="Quel est le délai de remboursement pour un client professionnel ?">Remboursement B2B</button>
|
| 56 |
+
<button class="suggestion" type="button" data-q="Quelle est la politique de retour pour les clients entreprise ?">Retour entreprise</button>
|
| 57 |
+
<button class="suggestion" type="button" data-q="Quel client a le meilleur chiffre d'affaires en juin ?">Meilleur CA juin</button>
|
| 58 |
+
<button class="suggestion" type="button" data-q="Quel sera le chiffre d'affaires le mois prochain ?">Hors périmètre</button>
|
| 59 |
+
</div>
|
| 60 |
|
| 61 |
<form class="composer" id="composer">
|
| 62 |
<input
|
| 63 |
type="text"
|
| 64 |
id="question-input"
|
| 65 |
+
placeholder="Votre question…"
|
| 66 |
autocomplete="off"
|
| 67 |
/>
|
| 68 |
+
<button type="submit" id="send-btn">Envoyer</button>
|
|
|
|
|
|
|
| 69 |
</form>
|
| 70 |
</div>
|
| 71 |
+
</div>
|
| 72 |
|
| 73 |
+
<details class="trace-drawer" id="trace-drawer">
|
| 74 |
+
<summary>Détail de la dernière réponse</summary>
|
| 75 |
+
<div class="trace-grid">
|
| 76 |
+
<div>
|
| 77 |
+
<h3>Décision</h3>
|
| 78 |
+
<p class="decision" id="decision-badge">—</p>
|
| 79 |
+
<p class="muted" id="decision-hint">Aucune question encore.</p>
|
|
|
|
| 80 |
</div>
|
| 81 |
+
<div>
|
| 82 |
+
<h3>Sources</h3>
|
| 83 |
+
<ul class="plain-list" id="source-list">
|
| 84 |
+
<li class="muted">—</li>
|
|
|
|
| 85 |
</ul>
|
| 86 |
</div>
|
| 87 |
+
<div>
|
| 88 |
+
<h3>Étapes</h3>
|
| 89 |
+
<ol class="plain-list numbered" id="trace-list">
|
| 90 |
+
<li class="muted">—</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
</ol>
|
| 92 |
</div>
|
| 93 |
+
<div>
|
| 94 |
+
<h3>Signaux</h3>
|
| 95 |
+
<ul class="signals">
|
| 96 |
+
<li><span>Soutenue</span><b id="diag-supported">—</b></li>
|
| 97 |
+
<li><span>SQL</span><b id="diag-structured">—</b></li>
|
| 98 |
+
<li><span>Boucles</span><b id="diag-loops">—</b></li>
|
| 99 |
+
<li><span>Latence</span><b id="diag-latency">—</b></li>
|
| 100 |
+
</ul>
|
|
|
|
| 101 |
</div>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="grades" id="grades-list"></div>
|
| 104 |
+
</details>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
</section>
|
| 106 |
|
| 107 |
<section class="view hidden" id="view-metrics">
|
| 108 |
+
<div class="intro">
|
| 109 |
+
<h1>Corrective RAG vs RAG classique</h1>
|
|
|
|
| 110 |
<p>
|
| 111 |
+
Mesures sur un jeu de questions annotées. Pas une promesse marketing :
|
| 112 |
+
des scores calculés localement.
|
|
|
|
| 113 |
</p>
|
| 114 |
+
</div>
|
| 115 |
|
| 116 |
+
<div id="metrics-empty" class="empty-panel hidden">
|
| 117 |
+
<p>Pas encore de résultats d’évaluation.</p>
|
| 118 |
+
<p class="muted">Lancer <code>python eval/evaluate.py</code></p>
|
| 119 |
</div>
|
| 120 |
|
| 121 |
<div id="metrics-content" class="hidden">
|
| 122 |
+
<p class="meta-line">
|
| 123 |
+
<span id="metrics-n"></span>
|
| 124 |
+
<span id="metrics-generated"></span>
|
| 125 |
+
</p>
|
| 126 |
+
<div class="score-row" id="headline-grid"></div>
|
| 127 |
+
<div class="result-table-wrap">
|
| 128 |
+
<table class="result-table">
|
| 129 |
+
<thead>
|
| 130 |
+
<tr>
|
| 131 |
+
<th>Mesure</th>
|
| 132 |
+
<th>Classique</th>
|
| 133 |
+
<th>Corrective</th>
|
| 134 |
+
<th>Écart</th>
|
| 135 |
+
</tr>
|
| 136 |
+
</thead>
|
| 137 |
+
<tbody id="metrics-tbody"></tbody>
|
| 138 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
</div>
|
| 140 |
+
<div class="bar-block" id="compare-rows"></div>
|
| 141 |
+
<p class="footnote" id="metrics-footnote"></p>
|
| 142 |
</div>
|
| 143 |
</section>
|
| 144 |
|
| 145 |
<section class="view hidden" id="view-about">
|
| 146 |
+
<div class="intro">
|
| 147 |
+
<h1>Comment la réponse est construite</h1>
|
|
|
|
| 148 |
<p>
|
| 149 |
+
Quatre étapes. Si la recherche est faible, le système corrige
|
| 150 |
+
avant d’écrire.
|
| 151 |
</p>
|
| 152 |
+
</div>
|
| 153 |
|
| 154 |
+
<ol class="flow">
|
| 155 |
+
<li>
|
| 156 |
+
<span class="flow-num">01</span>
|
| 157 |
+
<div>
|
| 158 |
+
<h2>Recherche</h2>
|
| 159 |
+
<p>Documents internes (PDF, MD, CSV) via embeddings.</p>
|
|
|
|
|
|
|
|
|
|
| 160 |
</div>
|
| 161 |
+
</li>
|
| 162 |
+
<li>
|
| 163 |
+
<span class="flow-num">02</span>
|
| 164 |
+
<div>
|
| 165 |
+
<h2>Jugement</h2>
|
| 166 |
+
<p>
|
| 167 |
+
Chaque passage est noté. Trois issues possibles :
|
| 168 |
+
assez bon, ambigu, ou trop faible.
|
| 169 |
+
</p>
|
| 170 |
</div>
|
| 171 |
+
</li>
|
| 172 |
+
<li>
|
| 173 |
+
<span class="flow-num">03</span>
|
| 174 |
+
<div>
|
| 175 |
+
<h2>Correction</h2>
|
| 176 |
+
<p>
|
| 177 |
+
Filtrage, reformulation, ou requête SQL en lecture seule
|
| 178 |
+
sur les ventes — selon le jugement.
|
| 179 |
+
</p>
|
| 180 |
</div>
|
| 181 |
+
</li>
|
| 182 |
+
<li>
|
| 183 |
+
<span class="flow-num">04</span>
|
| 184 |
+
<div>
|
| 185 |
+
<h2>Réponse contrôlée</h2>
|
| 186 |
+
<p>
|
| 187 |
+
Génération sourcée, puis vérification. Si ce n’est pas
|
| 188 |
+
soutenu : nouvelle passe, ou refus.
|
| 189 |
+
</p>
|
| 190 |
+
</div>
|
| 191 |
+
</li>
|
| 192 |
+
</ol>
|
| 193 |
|
| 194 |
+
<p class="closing-note">
|
| 195 |
+
Données locales · SQL SQLite sécurisé · pas d’invention hors preuves.
|
| 196 |
+
</p>
|
|
|
|
|
|
|
|
|
|
| 197 |
</section>
|
| 198 |
|
| 199 |
</main>
|
| 200 |
</div>
|
|
|
|
| 201 |
<script src="/static/app.js"></script>
|
| 202 |
</body>
|
| 203 |
</html>
|