- Pin ragas>=0.2.0,<0.3.0 (0.1.x imports removed langchain_community.vertexai)
- Wrap ragas imports in try/except → returns structured error dict instead of 500
- EvalPanel: show amber error banner when ragas unavailable
- EvalPanel: info (i) tooltips on all 4 RAGAS metric labels explaining what each means
- MessageBubble: info (i) tooltip on faithfulness badge explaining 1-5 LLM-as-judge scale
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Lazy-import ragas to prevent startup crash on Render
ragas 0.4.3 imports langchain_community.chat_models.vertexai at module
level, but that module was removed in langchain-community 0.4.x. This
caused an ImportError in server/routes/eval.py -> ragas_eval.py ->
ragas.__init__ import chain, crashing uvicorn before port binding.
Moved all ragas imports inside run_ragas_eval() so they are only loaded
when the eval endpoint is actually called, not at server startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: Migrate LLM to Groq, fix web search pipeline, add structured logging
LLM / provider:
- Switch LLM from Euron (gpt-4.1-mini) to Groq (llama-3.3-70b-versatile)
- Add langchain-groq dependency; Euron retained for embeddings only
- Update config.yaml, render.yaml, .env.example, README, docs
Web search (Tavily):
- Fix root bug: ConversationalRetrievalChain condensation step was stripping
prepended web context before LLM saw it — web search appeared to work but
answers always said "I don't know"
- Add run_query_with_web(): direct LLM call with RAG + Tavily context +
chat history, bypassing chain condensation entirely
- Add condense_question(): rewrites follow-up questions using chat history
before Tavily search so context-dependent queries work correctly
- Switch Tavily search_depth basic → advanced for richer financial content
- Fix memory.save_context key: {"output": answer} → {"answer": answer}
Logging:
- Centralise logging: configure_logging() in main.py sets root logger with
console + rotating file (logs/finrag.log, 5MB x3); silences noisy li…