<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eni Agunbiade</title>
    <description>The latest articles on DEV Community by Eni Agunbiade (@eni_agunbiade_20da61cf0bf).</description>
    <link>https://dev.to/eni_agunbiade_20da61cf0bf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4183282%2F25902c32-1fa9-4611-9a12-1bea83df905c.png</url>
      <title>DEV Community: Eni Agunbiade</title>
      <link>https://dev.to/eni_agunbiade_20da61cf0bf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eni_agunbiade_20da61cf0bf"/>
    <language>en</language>
    <item>
      <title>Building LexAegis: How Qwen 3.8 Max Powers an Evidence-Backed Legal AI Assistant on Monad</title>
      <dc:creator>Eni Agunbiade</dc:creator>
      <pubDate>Wed, 14 Oct 2026 00:26:40 +0000</pubDate>
      <link>https://dev.to/eni_agunbiade_20da61cf0bf/building-lexaegis-how-qwen-38-max-powers-an-evidence-backed-legal-ai-assistant-on-monad-455l</link>
      <guid>https://dev.to/eni_agunbiade_20da61cf0bf/building-lexaegis-how-qwen-38-max-powers-an-evidence-backed-legal-ai-assistant-on-monad-455l</guid>
      <description>&lt;p&gt;Building LexAegis: How Qwen 3.8 Max Powers an Evidence-Backed Legal AI Assistant on Monad&lt;br&gt;
Building AI that helps professionals make decisions is one challenge. Building AI whose evidence, limitations and human approvals can be inspected is another.&lt;br&gt;
For the Monad Metropolis hackathon, I built LexAegis, an AI-assisted legal workspace that combines Qwen 3.8 Max, encrypted document storage, human-controlled review and blockchain-based Proof of Review.&lt;br&gt;
The goal is straightforward:&lt;br&gt;
AI proposes. Humans decide. Monad records. Anyone can verify.&lt;br&gt;
In this article, I'll explain how Qwen powers LexAegis, how we prevent the model from making decisions it shouldn't, and what we've actually tested.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The problem: AI answers are not enough
Imagine an employment solicitor reviewing a settlement agreement.
The agreement contains payment provisions, confidentiality obligations, references to missing schedules and requirements relating to independent legal advice.
An AI assistant could summarise the agreement quickly.
But a lawyer needs more than a confident summary.
They need to know:&lt;/li&gt;
&lt;li&gt;Which document supports each conclusion?&lt;/li&gt;
&lt;li&gt;Are important schedules or supporting documents missing?&lt;/li&gt;
&lt;li&gt;Do the financial figures reconcile?&lt;/li&gt;
&lt;li&gt;What remains uncertain?&lt;/li&gt;
&lt;li&gt;Has a human actually reviewed and approved the result?
Without those answers, AI can accelerate reading while making the overall review process harder to audit.
LexAegis addresses this problem by separating AI-assisted analysis from evidence verification and human approval.&lt;/li&gt;
&lt;li&gt;Why we chose Qwen 3.8 Max
Qwen 3.8 Max serves as the reasoning and language component of Aegis, the LexAegis assistant.
We integrated the model through Alibaba Cloud's compatible-mode API, using structured JSON output and native tool calling.
Rather than asking Qwen to generate an unrestricted legal opinion, LexAegis gives it a constrained workflow.
Qwen can help:&lt;/li&gt;
&lt;li&gt;Explain legal clauses in accessible language.&lt;/li&gt;
&lt;li&gt;Identify potential contractual risks.&lt;/li&gt;
&lt;li&gt;Highlight missing supporting evidence.&lt;/li&gt;
&lt;li&gt;Interpret deterministic financial checks.&lt;/li&gt;
&lt;li&gt;Summarise selected evidence.&lt;/li&gt;
&lt;li&gt;Suggest questions and next steps for the reviewer.
Crucially, the model is not responsible for deciding whether a settlement is legally valid.
Qwen assists the reviewer; it doesn't replace the reviewer.&lt;/li&gt;
&lt;li&gt;Giving Qwen tools instead of unrestricted authority
LexAegis implements four read-only assistant tools:
read_sources
Retrieves the evidence excerpts made available to the model, allowing its response to reference actual source material.
check_payments
Uses deterministic application code to examine payment figures. The calculations use integer representations of GBP pence rather than relying on the language model to perform arithmetic.
check_evidence
Examines available evidence information and identifies gaps relevant to the review.
get_status
Retrieves permitted application or review status information.
Qwen can request these tools, but the application validates the arguments and controls execution.
Tool requests are subject to limits on execution time, provider attempts and tool usage.
The model cannot use these tools to sign agreements, approve documents, alter confirmed facts or execute blockchain transactions.
This separation matters because a model's ability to recommend an action is not authority to perform it.&lt;/li&gt;
&lt;li&gt;A real Qwen test: detecting a £2,000 discrepancy
We tested the integration against a fictional employment settlement fixture.
The synthetic agreement contained:
Item    Amount
Stated settlement total £24,000
First instalment    £10,000
Second instalment   £12,000
Sum of instalments  £22,000
Unexplained difference  £2,000&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During the recorded live-provider test, Qwen requested the available tools and incorporated their results into its response.&lt;br&gt;
The deterministic payment checker identified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stated total: 2,400,000 pence.&lt;/li&gt;
&lt;li&gt;Instalment sum: 2,200,000 pence.&lt;/li&gt;
&lt;li&gt;Difference: 200,000 pence.
The model also received evidence-gap information, including the absence of linked evidence relating to independent advice.
The final response contained source-linked explanations rather than unsupported assertions.
This demonstrates an important design principle:
Use the language model for interpretation. Use deterministic code for calculations and verification.
The example is synthetic, and the test does not establish legal correctness or reliability across real client matters.
The underlying test evidence is available in our GitHub repository.&lt;/li&gt;
&lt;li&gt;Building a conversational legal workspace
Our initial interface required users to select document passages before requesting an AI explanation.
That offered tight evidence control, but it was cumbersome for ordinary conversations.
We subsequently introduced a matter-aware Command Centre.
Instead of highlighting every passage, the intended workflow is:
Open a matter → Ask Aegis → Review the evidence-backed response.
For example, a lawyer can ask:
Analyse this employment settlement matter. Identify the main risks, missing evidence and recommended next steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LexAegis automatically retrieves relevant excerpts from the currently open matter's verified documents.&lt;br&gt;
The request is bounded: it uses a limited evidence selection, not unrestricted access to every document.&lt;br&gt;
The disclosure preview identifies the scope of the material being shared. The model is instructed to acknowledge incomplete coverage rather than claim to have reviewed an entire case file.&lt;br&gt;
Lawyers can still use the dedicated Review interface to examine individual passages.&lt;br&gt;
The conversational Command Centre was deployed to Railway on 13 October 2026. The new retrieval workflow has automated test coverage, while its behaviour with real-world legal matters requires further validation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Privacy: the user controls what Qwen receives
LexAegis uses a client-side encrypted Vault for document storage.
The AI integration follows an explicit disclosure process.
Before material is sent to Qwen, the application prepares a request and allows the user to review the information that will leave the browser.
Only the authorised excerpts and permitted context are included.
The application also verifies source material against its stored document references.
This creates an important boundary between private documents and external AI processing.
However, this is not end-to-end encryption through model inference.
Information disclosed to Qwen must be readable by the model provider. LexAegis does not independently establish the provider's retention or training policies.
The application therefore makes disclosure an explicit user decision rather than disguising external processing.&lt;/li&gt;
&lt;li&gt;Making AI conclusions traceable
One of our most important architectural decisions was to validate evidence citations.
When Qwen receives source material, the application associates it with reference handles.
The model can cite those handles in its output.
LexAegis checks that cited references correspond to evidence actually made available during the run.
This helps prevent fabricated source references from appearing as genuine citations.
It doesn't guarantee that every interpretation is correct.
It does provide a stronger foundation for human review: the lawyer can inspect the underlying text instead of accepting an unsupported answer.&lt;/li&gt;
&lt;li&gt;Connecting AI-assisted work to Monad
LexAegis also implements a Proof of Review workflow.
The idea is to make a human-approved review package independently verifiable.
The process separates three responsibilities:
Qwen: Assists with analysis and explanation.
The lawyer: Reviews evidence, makes decisions and authorises the approved package.
Monad: Records a cryptographic commitment associated with the review.
Our ProofOfReviewRegistry smart contract is deployed on Monad Testnet.
Contract address:
0x453bfd1602d8a8666f55bf9a8d87b127cb94048f
Chain ID: 10143
An independent verifier can check supported review packages against the associated on-chain records.
Importantly, a blockchain receipt proves that a particular commitment was recorded. It does not prove that the underlying legal advice was correct or that the reviewer possessed particular professional qualifications.
Qwen cannot independently authorise an approval or submit a transaction.&lt;/li&gt;
&lt;li&gt;What we actually validated
Our recorded Qwen integration testing included:&lt;/li&gt;
&lt;li&gt;Genuine requests to the configured Qwen 3.8 Max provider.&lt;/li&gt;
&lt;li&gt;Native tool calling.&lt;/li&gt;
&lt;li&gt;Structured output validation.&lt;/li&gt;
&lt;li&gt;Read-only tool execution.&lt;/li&gt;
&lt;li&gt;Source-reference validation.&lt;/li&gt;
&lt;li&gt;Detection of a synthetic payment discrepancy.&lt;/li&gt;
&lt;li&gt;Provider capability verification.&lt;/li&gt;
&lt;li&gt;Cancellation behaviour.
The recorded smoke test contains six provider request identifiers.
We also tested cancellation during a provider interaction. A cancelled request did not continue executing local tools, although cancellation cannot retract information already transmitted to the provider.
The application has since been deployed, and a real Qwen explanation was observed through the production Review interface using a synthetic employment settlement document.
These results demonstrate a functioning integration, not comprehensive testing of legal reasoning accuracy.&lt;/li&gt;
&lt;li&gt;Why Qwen matters to LexAegis
Without Qwen, LexAegis would still have its encrypted Vault, deterministic checks, approval workflow and blockchain registry.
But it would lack an accessible way for a lawyer to explore complex document evidence conversationally.
Qwen provides the language understanding and reasoning interface that connects those systems.
A user can ask a question in ordinary language and receive an explanation informed by the evidence and tools made available to the model.
The value isn't simply faster summarisation.
It's making evidence-backed professional review more accessible, understandable and efficient while keeping consequential decisions under human control.
That's the role we believe AI should play in high-stakes professional workflows.&lt;/li&gt;
&lt;li&gt;Try LexAegis
Live application:
&lt;a href="https://terrific-joy-production-54e8.up.railway.app" rel="noopener noreferrer"&gt;https://terrific-joy-production-54e8.up.railway.app&lt;/a&gt;
Independent verifier:
&lt;a href="https://lexaegis-verifier-production.up.railway.app" rel="noopener noreferrer"&gt;https://lexaegis-verifier-production.up.railway.app&lt;/a&gt;
Source code:
&lt;a href="https://github.com/ejasuave/LexAegis" rel="noopener noreferrer"&gt;https://github.com/ejasuave/LexAegis&lt;/a&gt;
Monad Testnet registry:
0x453bfd1602d8a8666f55bf9a8d87b127cb94048f
LexAegis is a hackathon prototype. Its legal analysis must be independently assessed by qualified professionals before any real-world reliance.
Our next steps include improving matter-wide evidence coverage, expanding testing and strengthening the experience of reviewing and verifying AI-assisted professional work.
Final thoughts
The future of professional AI isn't just about generating better answers.
It's also about being able to explain where those answers came from, what the model was allowed to do and who ultimately accepted responsibility for the result.
With LexAegis, we're exploring that future using Qwen 3.8 Max for evidence-assisted reasoning and Monad for independently verifiable Proof of Review.
AI proposes. Humans decide. Monad records. Anyone can verify.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
