Showing posts with label open-source. Show all posts
Showing posts with label open-source. Show all posts

31.7.25

LangExtract: Google’s Gemini-Powered Library That Turns Raw Text into Reliable Data

 

A new way to mine insight from messy text

On July 30 2025 the Google Developers Blog unveiled LangExtract, an open-source Python package that promises to “unlock the data within” any text-heavy corpus, from clinical notes to customer feedback threads. Built around Gemini models but compatible with any LLM, the project aims to replace brittle regex pipelines with a single declarative interface for extraction, visualization and traceability. 

Why LangExtract stands out

LangExtract combines seven features that rarely appear together in one tool:

  1. Precise source grounding – every entity you pull out is linked back to its exact character span in the original document, so auditors can see where a value came from.

  2. Schema-enforced outputs – you describe the JSON you want, add a few examples, and the library leverages Gemini’s controlled generation to keep responses on-spec.

  3. Long-context optimisation – chunking, parallel passes and multi-stage recall tame “needle-in-a-haystack” searches across million-token inputs.

  4. Interactive HTML visualisation – one command turns results into a self-contained page where extractions glow inside the source text.

  5. Flexible back-ends – swap Gemini for on-device Ollama models or any OpenAI-compatible endpoint.

  6. Domain agnosticism – the same prompt-plus-examples recipe works for finance, law, medicine or literature.

  7. Apache-2.0 licence – no gating, just pip install langextract

How it works in practice

A “quick-start” script pulls Shakespeare characters, emotions and relationships in about a dozen lines of code, then writes an interactive HTML overlay showing each extraction highlighted inside the play. The same pattern scales: push the full Romeo and Juliet text through three extraction passes and LangExtract surfaces hundreds of grounded entities while keeping recall high. G

The GitHub repository already counts 200+ stars less than a week after launch, and ships with examples for medication extraction and structured radiology reporting—fields where provenance and accuracy are critical. A live Hugging Face demo called RadExtract shows the library converting free-text X-ray reports into structured findings, then color-coding the original sentences that justify each data point. 

Under the hood: Gemini plus controlled generation

When you pass model_id="gemini-2.5-flash" (or -pro for harder tasks), LangExtract automatically applies Google’s controlled generation API to lock output into the schema you defined. That means fewer JSON-parse errors and cleaner downstream pipelines—something traditional LLM calls often fumble. For massive workloads, Google recommends a Tier-2 Gemini quota to avoid rate limits. 

Why developers should pay attention

Information extraction has long oscillated between hand-tuned rules (fast but brittle) and heavyweight ML pipelines (accurate but slow to build). LangExtract offers a third path: prompt-programming simplicity with enterprise-grade traceability. Because it’s open-source, teams can audit the chain of custody and fine-tune prompts to their own compliance rules instead of black-box vendor filters.

Whether you’re structuring earnings calls, tagging sentiment in product reviews, or mapping drug-dosage relationships in EMRs, LangExtract turns unreadable text into queryable data—without sacrificing transparency. For AI enthusiasts, it’s also a practical showcase of what Gemini’s long-context and schema-control features can do today.

Bottom line: install the package, craft a clear prompt, add a few gold examples, and LangExtract will handle the rest—from parallel chunking to an HTML dashboard—so you can move straight from raw documents to actionable datasets.

9.6.25

Google Open‑Sources a Full‑Stack Agent Framework Powered by Gemini 2.5 & LangGraph

 Google has unveiled an open-source full-stack agent framework that combines Gemini 2.5 and LangGraph to create conversational agents capable of multi-step reasoning, iterative web search, self-reflection, and synthesis—all wrapped in a React-based frontend and Python backend 


🔧 Architecture & Workflow

The system integrates these components:

  • React frontend: User interface built with Vite, Tailwind CSS, and Shadcn UI.

  • LangGraph backend: Orchestrates agent workflow using FastAPI for API handling and Redis/PostgreSQL for state management 

  • Gemini 2.5 models: Power each stage—dynamic query generation, reflection-based reasoning, and final answer synthesis.


🧠 Agent Reasoning Pipeline

  1. Query Generation
    The agent kicks off by generating targeted web search queries via Gemini 2.5.

  2. Web Research
    Uses Google Search API to fetch relevant documents.

  3. Reflective Reasoning
    The agent analyzes results for "knowledge gaps" and determines whether to continue searching—essential for deep, accurate answers 

  4. Iterative Looping
    It refines queries and repeats the search-reflect cycle until satisfactory results are obtained.

  5. Final Synthesis
    Gemini consolidates the collected information into a coherent, citation-supported answer.


🚀 Developer-Friendly

  • Hot-reload support: Enables real-time updates during development for both frontend and backend 

  • Full-stack quickstart repo: Available on GitHub with Docker‑Compose setup for local deployment using Gemini and LangGraph 

  • Robust infrastructure: Built with LangGraph, FastAPI, Redis, and PostgreSQL for scalable research applications.


🎯 Why It Matters

This framework provides a transparent, research-grade AI pipeline: query ➞ search ➞ reflect ➞ iterate ➞ synthesize. It serves as a foundation for building deeper, more reliable AI assistants capable of explainable and verifiable reasoning—ideal for academic, enterprise, or developer research tools 


⚙️ Getting Started

To get hands-on:

  • Clone the Gemini Fullstack LangGraph Quickstart from GitHub.

  • Add .env with your GEMINI_API_KEY.

  • Run make dev to start the full-stack environment, or use docker-compose for production setup 

This tooling lowers the barrier to building research-first agents, making multi-agent workflows more practical for developers.


✅ Final Takeaway

Google’s open-source agent stack is a milestone: it enables anyone to deploy intelligent agents capable of deep research workflows with citation transparency. By combining Gemini's model strength, LangGraph orchestration, and a polished React UI, this stack empowers users to build powerful, self-improving research agents faster.

 OpenAI has released GPT-OSS , a pair of open-weight language models designed for strong reasoning and agentic workflows— gpt-oss-120b and ...