Spaces:
Running
Running
deploy: phase 3 BYOK backend (Dockerfile.hf, FastAPI on 7860)
Browse files- Dockerfile.hf +12 -0
Dockerfile.hf
CHANGED
|
@@ -128,6 +128,18 @@ ENV SAR_MULTI_TENANT_COLLECTIONS=true
|
|
| 128 |
# scores one Groq call at a time. 180 s leaves headroom for the
|
| 129 |
# reranker cold load + Groq free-tier rate-limit waits on a fresh boot.
|
| 130 |
ENV SAR_REQUEST_TIMEOUT_S=180
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
ENV SAR_FAITHFULNESS_GATE_ENABLED=true
|
| 132 |
# `flag` keeps the answer text intact and lets the UI render the
|
| 133 |
# faithfulness badge. `drop` would rewrite sentences out of the answer
|
|
|
|
| 128 |
# scores one Groq call at a time. 180 s leaves headroom for the
|
| 129 |
# reranker cold load + Groq free-tier rate-limit waits on a fresh boot.
|
| 130 |
ENV SAR_REQUEST_TIMEOUT_S=180
|
| 131 |
+
|
| 132 |
+
# Grader thresholds tuned looser for the BYOK demo so short user-uploaded
|
| 133 |
+
# docs are not aggressively filtered out by the LLM judge. The default
|
| 134 |
+
# 0.7 / 0.5 produced too many "all docs irrelevant" refusals on this
|
| 135 |
+
# small corpus; 0.55 / 0.3 keeps the corrective-RAG retry loop active
|
| 136 |
+
# but stops the demo from refusing on edge-case wording.
|
| 137 |
+
ENV SAR_RELEVANCE_THRESHOLD=0.55
|
| 138 |
+
ENV SAR_RELEVANCE_RETRY_THRESHOLD=0.3
|
| 139 |
+
# Cap corrective-RAG retries -- two refines is enough; further rewrites
|
| 140 |
+
# stack Groq calls without meaningfully improving recall on a 10-doc
|
| 141 |
+
# corpus and just chew through the SLO.
|
| 142 |
+
ENV SAR_MAX_RETRIES=1
|
| 143 |
ENV SAR_FAITHFULNESS_GATE_ENABLED=true
|
| 144 |
# `flag` keeps the answer text intact and lets the UI render the
|
| 145 |
# faithfulness badge. `drop` would rewrite sentences out of the answer
|