Projects
Jan 18, 2024

dLocal / Soljud - Judicial Request Processing System (RAG)

Python and LLM-powered backend that automates the processing of Soljud judicial requests for dLocal, classifying actions and generating Jira issues under a 24-hour legal SLA.

FintechLegal AutomationRAGLLMsPythonWorkflow AutomationComplianceEmail ProcessingData PipelinesJira IntegrationBackend SystemsBrazilCross-Company Collaboration

As part of the Pro Internacional (prointernacional.com) and Delfos (delfoslabs.com) teams, I collaborated with dLocal (dlocal.com) on an internal system to handle judicial requests coming from Soljud in Brazil.

In the Brazilian context, legal processes such as account seizures, releases and other money retention operations are communicated through Soljud, a service that essentially acts as an email inbox where courts send messages to financial institutions. If an institution like dLocal has a relationship with the person or account mentioned, it must act within 24 hours and confirm the operation. Given dLocal's scale and the volume of requests, manually managing this legal requirement had become a serious compliance and operational burden.

To address this, we designed a set of Python jobs that automate the end-to-end flow:

  • Read all Soljud emails and attachments via the service's SOAP APIs, extracting both the body of the message and relevant documents.
  • Use LLMs to analyze the email content and attachments, identify:
    • What legal action is being requested (seizure, release, retention, etc.).
    • Who the action is targeting (person, account, legal identifiers).
    • Whether there is a matching user or account in dLocal's internal databases, combining model output with structured lookups.
  • For each processed request, automatically create a Jira issue containing:
    • All the structured data extracted from the request.
    • The tags and fields needed to route the case to the right specialized team.
    • Enough context for that team to execute the legal action or mark the request as discarded when applicable.

The system follows a RAG (Retrieval-Augmented Generation) approach: LLMs interpret the unstructured legal text from Soljud, while internal data sources provide the factual grounding needed to match users and accounts more reliably. Final decisions remain with legal and operations teams, but the pre-processing is fully automated, which significantly reduces:

  • The time required to understand and classify each request.
  • The risk of missing or delaying cases within the 24-hour legal window.
  • The dependency on manual email reading, system searching and ticket creation.

My contribution focused on implementing the Python jobs, integrating with Soljud via SOAP, orchestrating the LLM-based analysis, and structuring the output data for Jira, helping turn a fragile, manual legal workflow into an automated, traceable process inside dLocal's ecosystem.

Crafted by Juan Felipe Arellano • © 2025