An Indic Voice Agent with CUGA
A voice-first farm assistant answers spoken questions in Hindi, Tamil and other Indic languages from a 154-page English agricultural handbook, using IBM's open-source CUGA harness as a text-in, text-out core wrapped by swappable speech-to-text and text-to-speech layers (Sarvam AI in the browser, or self-hosted SraVaani and Svara). The hard problem was cross-lingual retrieval, not voice: CUGA's default English-only embedding model silently returned wrong passages for non-English queries, so the grounded model just claimed the handbook lacked an answer, and no layer raised an error. Switching to intfloat/multilingual-e5-large let one English document serve every language. Other lessons: strip markdown and citations before speech, use an OFF_TOPIC reply prefix instead of a second LLM call for guardrails, and test retrieval with a non-English question before tuning prompts.
Related posts
- Banque des Territoires (CDC Group) x Polyconseil x Hugging Face: Enhancing a Major French Environmental Program with a Sovereign Data Solution
Hugging Face easyNoviceBanque des Territoires, Polyconseil and Hugging Face built a sovereign RAG application that drafts sourced email replies for the EduRénov school-renovation program from its internal documentation. Agents edit and validate the drafts, and that feedback is collected for future fine-tuning and RLHF. The system is a modular monolith in hexagonal architecture, with the LLM, embedding model and retrieval method swappable through configuration. LLM calls are offloaded to Hugging Face Text Generation Inference on GPUs at SecNumCloud-qualified NumSpot, currently running Mistral-7B-Instruct-v0.3, with CroissantLLM under evaluation and RAGAS used for evaluation.
- Hugging Face x LangChain : A new partner package
Hugging Face mediumAdeptlangchain-huggingface is a new Python partner package jointly maintained by Hugging Face and LangChain, replacing community-written integrations that had drifted out of date. It provides HuggingFacePipeline for running transformers models locally, HuggingFaceEndpoint for the serverless Inference API or deployed TGI endpoints via InferenceClient, and ChatHuggingFace, which turns message lists into model-specific prompts with tokenizer.apply_chat_template. For embeddings it offers HuggingFaceEmbeddings (local sentence-transformers) and HuggingFaceEndpointEmbeddings (Hub or TEI instances), each shown with short code examples.
- Visual Document Retrieval Goes Multilingual
Hugging Face hardMastervdr-2b-multi-v1 is a multilingual embedding model that encodes document page screenshots into single dense vectors for OCR-free retrieval. It is fine-tuned from dse-qwen2-2b-mrl-v1 on a new open 500k-sample synthetic dataset covering Italian, Spanish, English, French and German. The data pipeline is laid out step by step: topic-driven PDF scraping, layout-based page sampling, VLM query generation, filtering with voyage-3 and hard-negative mining. The model improves NDCG@5 by about 2.3% on average over the base model and by 2.3% on Italian-to-German cross-lingual search. An English-only variant matches the base model using 768 instead of 2560 image tokens, about 3x faster inference, and Matryoshka plus binary embeddings keep roughly 97-99% of quality at much smaller vector sizes.
- Build a custom RAG AI agent in TypeScript and Jupyter
Deno mediumAdeptA local agentic RAG pipeline built in TypeScript inside a Deno Jupyter notebook, using LangChain and LangGraph with Ollama models. Deno blog posts are loaded with Cheerio, split into 500-character chunks, embedded with mxbai-embed-large and stored in an in-memory vector store exposed as a retriever tool. A LangGraph state graph wires an agent node (Llama 3.2 3B, the only small local model the author got tool calling working with) to retrieval, a binary relevance grader, query rewriting and final answer generation with DeepSeek R1 8B. The setup suits confidential documents that must not leave the machine.
- Expert Support case study: Bolstering a RAG app with LLM-as-a-Judge
Hugging Face mediumAdeptDigital Green's Farmer.chat, a GPT-4o ReAct agent backed by a RAG pipeline over ~46,000 agricultural research papers (semantic chunking, Qdrant), uses LLM-as-a-judge to evaluate prompt clarity, question type, answered rate and RAG faithfulness at scale. The faithfulness judge, a RAGAS-inspired binary NLI prompt that checks atomic statements against retrieved context, correlated well with human raters on ~360 questions. Benchmarking four LLMs on 700+ queries showed Gemini-1.5-Pro was most faithful (91%) but left 19.4% unanswered, so the team chose Gemini-1.5-Flash for its balance of 89% faithfulness and only 4.5% unanswered.