aws
Which Lease Did Your AI Just Quote?
“Give me the renewal notice period for Suite 4.” The property manager gets 90 days, followed by a quotation and a link to a signed lease. She recognizes the signature. It belongs to the client in Suite 5.
That is the awkward thing about retrieval-augmented generation (RAG). A model can quote a document accurately while the application discloses someone else’s agreement. In this fictional portfolio, two clients rent space at the same address. Both leases call the relevant section “Exercise of option.” A search for those words has every reason to find both. Permission to read them comes from the property system.
Establish who owns the document before indexing it
Start with the upload workflow from our invoice article. After intake clears a file, create a version-specific document record. For Suite 4, the property system supplies the customer ID, property ID, lease ID, document ID, and relationship to any amendment. The file name and the company name printed on page one are useful to a reviewer. Neither gets to assign the customer ID.
Write those identifiers as application-controlled metadata alongside the document in the S3 data source for Amazon Bedrock Knowledge Bases. Choose a vector store that supports the metadata filters the worker needs. If the upload has no verified owner, hold it out of ingestion. A missing ownership field should be an intake exception with a named owner, rather than a document everyone can search. AWS retrieval configuration and metadata filters
Which words reach the model?
- Property system
Resolve the manager’s current access to Suite 4 and its lease family.
- Bedrock Retrieve
Search within that customer, property, and lease. Return passages and source identifiers to Lambda.
- Lambda → Bedrock Converse
Verify every source against the authorized document versions. Send only the accepted passages for drafting.
Give the worker a chance to stop
The queue message carries a job ID. When Lambda picks it up, it loads the requester from the job record and checks their current access. This matters when someone leaves a property team while their request is queued. Build the retrieval filter on the server. A property name typed into the question can narrow a conversation, but it grants no access.
Use separate retrieval and generation calls. Between the two, look up every returned document ID and version in the authoritative register. A source marked withdrawn, missing its identifier, or belonging to Suite 5 stops the request. Keep a restricted audit record of the decision and source IDs. Putting disputed passages in a general error log would create another disclosure. Repeat the access check when a reader opens a citation or a saved answer. Bedrock Retrieve API
Put the amendment on the reviewer’s desk
Suite 4’s original lease says 45 days. A later signed amendment explicitly replaces that paragraph with 60 days. Suite 5’s lease says 90. All three numbers are genuine. A nearest-neighbor search also has a less obvious failure mode: it can return the old Suite 4 paragraph and omit the amendment altogether.
Use the lease register to enumerate the base agreement and applicable amendments. Require evidence from the relevant versions before generating an answer. Give each passage a short source ID and require the draft to cite one of the IDs actually supplied. Display the quoted passage, page, and version. If the relationship between two clauses is unresolved, show both to the lease administrator and hold the reminder date for review.
Test what was sent, as well as what came back
| Fictional job | Inspect at the model boundary | Expected reviewer outcome |
|---|---|---|
| Suite 4 manager asks about renewal | Only Suite 4 sources, including its amendment | See the 60-day clause beside the original 45-day wording |
| Suite 5 manager asks the same question | Only Suite 5 sources | See the 90-day clause and its source |
| Suite 4 access expires while queued | Zero generation calls | Access-denied status |
| Retrieval returns an unexpected document version | Zero generation calls | Source verification exception |
Capture source IDs at a test double for the generation client. Deliberately return a foreign passage from the retrieval fixture. The test should fail if that passage reaches generation, even if the model would have answered “60 days.” That distinction connects OWASP’s LLM08 Vector and Embedding Weaknesses to LLM02 Sensitive Information Disclosure. The property manager needs both a date she can verify and a citation she is entitled to open. OWASP Top 10 for LLM Applications
How DigitalCoding Can Help
If finding a renewal deadline means opening a lease and every amendment, we can help your property team test a quicker way. DigitalCoding can build a search pilot that shows the clause, page, and signed amendment behind an answer. Together we can check what two managers with different portfolio permissions can see.
A first pilot can cover one property and the renewal questions your team answers most often. Tell us where you keep signed agreements and how you grant access today. Explore AI automation services or start a lease search project.