Conversations, CRM notes, meetings and documents
Clean text split by author, closed-list labels in validated JSON
Fields per conversation, interaction or document, with measured accuracy
Questions dashboard, no-reply queue, enriched CRM and AI agent
What it solves
- The most frequent questions and pending items come from real conversations, with an auditable count.
- Each conversation, interaction or contact gets closed-list fields you can filter and add up.
- AI extraction has its accuracy measured field by field against manual work.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- The text source connected to Nekt: platform database, WhatsApp logs, CRM or documents
- The list of who belongs to operations (ids, roles or phones) and the closed categories for each field
- The AI provider key stored as a secret, never in the code
What you get
- A table per conversation or interaction with AI fields and processing status
- A ranking of questions and pending items with counts computed in SQL
- An accuracy report by field against the answer key
- An AI agent that answers with the labels and the source excerpt
Where to activate
Top customer questions and top operations pending items per month, with counts in SQL, for training and process improvement.
Groups and claims awaiting reply with high urgency, sorted by waiting time, for the leader to assign.
Intent, objection and decision maker written to the CRM, and notes and meetings indexed so the agent can answer about the relationship with each company.
The prompt is the easy part. The work is separating who speaks, fixing the categories, processing only what is new and building the answer key to measure accuracy. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
The claim conversation, the group with the real estate agency and the meeting note stay as free text, and the answer to what the most common questions are depends on someone reading everything. Whoever sends raw text to the AI mixes staff messages with customer messages, gets labels that change on every run and stores a failed call as a calm conversation. Without an answer key, nobody knows whether the automatic extraction is right.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
Classify each message as operations or customer by the sender's id or role (claims analyst, brokerage admin) or by a table of team phones. Questions come only from customer messages; operations pending items come only from messages operations sent. An unknown sender is a customer, and this is stated.
Replace base64 images and files embedded in the text with [attached image] and [attached file]. Normalize case and spaces. For questions, keep only messages with a question mark, more than 15 characters and that are not a short greeting. For income in bank transactions, first apply a dictionary of patterns (payroll, benefits, delivery apps) and send only what is left to the model.
Group identical texts with their occurrence count. Ask the AI only for the label of each text (or each group), returned as a text-to-label mapping. The total per label is the sum of the counts in SQL. Limit the number of texts per call (very large prompts came back empty) and split into batches.
Each field has fixed values: sentiment (positive, neutral, negative), conversation status (open, closed, awaiting reply), urgency (low, medium, high), intent, topic and stage signal in the CRM, contact's decision power (decision maker, influencer, user). Validate the JSON, normalize keys (accents, case, keys in Portuguese or English) and send anything outside the list to "other".
When the call fails, the JSON does not come or the quota runs out, store an error status, the error message and null fields. Never fill neutral sentiment and low urgency as default values. Retry with increasing waits and reprocess only the failures.
Store, per conversation or interaction, the hash of the text sent and the prompt version. Reprocess when a new message arrives or the prompt changes. For the groups queue, show those open and awaiting reply plus those closed within the last 2 hours, and count how many times each group was checked while open.
For document extraction (initial data and line items of a court case, for example), compare by case and field the AI's value with the manual work. The universe is only cases that have an answer key, with the latest version on each side. Person names: equality without accents and case. Company names: strong normalization (no legal suffix, punctuation or branch) and a matching ladder: equal, equal without spaces, prefix of 10 or more characters. Dates exactly equal. Amounts equal to 2 decimals. A missing side is "no data to compare", not an error. Items not comparable by value leave both sides.
The provider key is a Nekt secret, never written in the notebook (it appeared in plain text in more than one workspace). Mask CPF (individual tax ID), phone and email before sending when the label does not depend on them. Cut the text to a maximum length per call (for example, 3,000 characters per interaction) to control cost.
A 10-row limit for testing is useful, but it has to go before scheduling. Record on each run how many items were eligible, how many were sent, how many came back valid and how many failed.
What to extract from each kind of text
Closed-list fields real operations extracted. The AI labels; counting and rules stay in SQL.
Definitions
Pitfalls that already happened
When the AI call failed, the function returned neutral sentiment and low urgency, and groups with problems vanished from the attention list.
Error status and null fields, with reprocessing of failures.
The questions ranking stored the occurrence sum the model itself returned, and the number did not match the messages.
Ask only for the text-to-label mapping and sum the counts in SQL.
Sending thousands of message types in one call made the AI return an empty list, and the notebook crashed out of memory when collecting everything.
Cap on items per call, batches and a bounded collect.
AI provider keys appeared written in transformation code, including as the default value when the environment variable did not exist.
A Nekt secret and an explicit failure when the key is not configured.
Contact and interaction classification ran on a schedule with the 10-row test limit, and the CRM looked enriched.
Remove the limit and check eligible against sent on every run.
Comparing the extraction with the answer key flagged equal names written with LTDA, branch or abbreviation as errors, and the rule stopped working when the engine moved to Spark.
Strong normalization with a matching ladder, tested on the transformation engine.
Acceptance test
The case is done when every item passes.
- No message from operations ids, roles or phones enters the customer questions ranking.
- For each label in the ranking, the total equals the sum of the counts of the texts mapped to it.
- Every item sent has a processing status (valid or error) and no error appears with sentiment or urgency filled in.
- Running the transformation again with no new messages sends no item to the AI.
- In the accuracy report, every case and field row has a status: equal, different, answer key only, AI only or no data to compare.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
AI over unstructured text - AI fields are in <table>, one record per <conversation | interaction | contact | document>, with status_processamento (processing status) and versao_prompt (prompt version). - Consider only records with a valid processing status. Records with an error are not neutral: say they were not classified. - Questions come only from customer messages. Operations pending items come only from operations messages (senders in <operations_table>). - Categories: sentiment (positive, neutral, negative), status (open, closed, awaiting reply), urgency (low, medium, high), topic <list>, intent <list>. Outside the list = other. - Counts and rankings come from SQL over the text-to-label mapping, never from totals generated by the AI. - Group awaiting reply: the customer's last message is after the last operations message. Say how long it has been waiting. - Extraction accuracy: use <accuracy_table>, only cases with an answer key; "no data to compare" is not an error. - When citing a classification, bring the excerpt or the id of the source record. Exceptions per client: - <client>: operations identified by roles <roles>; all other senders are customers. - <client>: line items <codes> are not comparable by value and stay out of accuracy.
Build the "AI over unstructured text" case in my Nekt workspace following the rules at https://academy.nekt.com/en/industrias/financeiros/ia-texto-nao-estruturado.md. 1) Find the source tables and confirm the columns the rules use. 2) Create a transformation at the stated grain applying every rule. 3) Run the acceptance test and show me the result of each item. 4) Create the case's context document in the workspace, leaving my clients' exceptions open for me to fill in.
Variations
An executive summary of the relationship per account, generated over the already classified interactions and refreshed only when a new interaction arrives.
Notes, meetings and bios prepared for embedding with the source record id, so the agent can cite the source.
Fields with low historical accuracy go to a review queue before moving on in the pipeline.