google/langextract ? reverse-engineered prompt
Reverse engineered prompt
I need a Python library that can read through large text documents and pull out structured information using an LLM. The idea is that I can give it a simple prompt and a few examples to define what I'm looking for—like extracting all the character names, their emotions, and relationships from a play.
The main requirement is that every piece of data it extracts must be grounded to the exact source text. Don't let it make things up or paraphrase. Then, the tool should generate a single, self-contained HTML file that visualizes the results. In this file, I want to see the original text and be able to hover over the extracted data to see it highlighted in context. It should be flexible, so let's use Google's Gemini models, but also make it easy to connect to local models via Ollama.
Are you gonna build this?
make sure you review the code using coderabbit