Build permission-aware document Q&A on Amazon Bedrock: ingest versioned synthetic policies, retrieve only readable evidence with PostgreSQL/pgvector, validate generated citations and measure support separately from access.
Generative AI Engineer. Intermediate.
For developers who read short Python functions and understand HTTP requests, and want to build retrieval-augmented question answering on Amazon Bedrock that respects document permissions, validates citations and measures answer support.
A browser question uses an application token. Creating the server uses an AWS identity. Opening the private connection uses that AWS identity again. Those actions may happen on one laptop, but they grant different kinds of access. This lesson helps you identify who is acting, where a command runs and which inputs it needs before you follow the build guide.
“How long must we keep service inspection records?” sounds like a simple question. Alderbrook's fictional Engineering policies make it harder: one draft says three years, another says seven, and neither has approved precedence. A useful answer must show that conflict and its sources. A Finance reader must not receive either Engineering passage just because it matches the question.
“How long must we keep service inspection records?” has two conflicting Engineering drafts in Alderbrook's synthetic policies: three years and seven years, with no approved precedence. A language model's fluent answer cannot resolve that conflict by itself. The application must first find the readable drafts, then ask for an answer that explains their disagreement and cites both.
Ingestion turns an approved document inventory into stored passages and their embedding vectors. It must also decide when those passages become visible. In this application, completing one new document does not publish part of a replacement corpus: the operator stages the work, checks completeness, then activates the entire inventory in one database transaction.
Retrieval selects passages that a question-answering model may use as evidence. In this application, that means finding similar vectors among the reader's permitted, active documents, applying a calibrated relevance cutoff, and checking that the selected evidence has not changed before it is used.
Authorization decides which evidence a reader may receive. In this application, a server-validated demo token establishes an identity, PostgreSQL policies restrict that identity's readable rows, and later checks look for permission or corpus changes while a question is running. A source link must pass a fresh access check too.
A citation connects a generated claim to evidence that a reader can inspect. This application checks the answer's JSON contract, the selected chunk IDs and the presence of each quoted string in its referenced chunk. It then supplies source metadata from the database and checks evidence freshness before final serialization. Those checks establish useful provenance; human review still decides whether the evidence supports the claim.
Evaluation asks whether the application does the intended job on specified questions, evidence and reader permissions. A service can return valid JSON, quote a real sentence and still give the wrong answer. It can also answer well while exposing information the reader must not receive. Measure these outcomes separately so an attractive average cannot hide the failure.
Operations connects a working request to the machine, storage, software and people that keep it available. In this lab, a healthy process, a searchable corpus and an approved model-call window are three different conditions. A restart can preserve the database while a source release can replace the host and remove it. Understanding those differences prevents a small diagnostic change from becoming an unintended rebuild.
Troubleshooting turns a symptom into a small set of competing explanations, then chooses evidence that separates them. A successful retry does not explain the original failure. A status code identifies a boundary, but several causes can reach that boundary. Keep the question, reader identity, source revision, configuration and operation time consistent while comparing observations.
An interview answer should connect a requirement to a design decision and an observable consequence. Naming Bedrock, PostgreSQL and Terraform does not explain why they belong in this system. Start from the fictional company's problem: answer policy questions with sources while keeping Finance and Engineering evidence within each reader's access.
Start in the native source/ folder. This milestone prepares tools, exercises the software locally and creates the archive that the AWS host will consume. Complete the inline procedure before the short cloud window begins.
Connect the administrator-supplied account and temporary identity to one explicit lab decision. The inline procedure establishes input origins, permissions, prices, image choice and cleanup authority before any resource is created.
Create the versioned delivery bucket before the host needs it. Review the root's ownership and plan, then retain the state and deployment receipt through removal. Cleanup remains reachable if this first cloud milestone fails partway through.
Bind the locally checked archive to one stored S3 version. Its checksum and version ID travel together into the workload; uploading again is a deliberate release operation rather than a readiness check.
Use the pinned archive to create the dedicated network and host in their supported root order. Distinguish EC2 status, SSM connectivity, first-boot completion and application health before proceeding to the private browser path.
Reach the host's loopback application through Session Manager and inspect the native page from localhost. This baseline requires no reader token or model question. Close the tunnel and continue directly to destruction after the check.
Remove the host, archive versions and foundation in dependency order, then compare retained state and resource IDs with AWS. Keep the local records needed to resolve deletion failures and delayed charges; closing a browser or stopping EC2 alone does not finish this milestone.
Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.
This is a learning reference, not a hosted lab. Reading and local mocked checks require no AWS resources. A separately approved lab uses EC2, encrypted EBS, public IPv4 for egress, versioned S3 artifacts and CloudWatch Logs; model exercises also charge Bedrock embedding/generation usage, including possible failed or uncertain attempts. Obtain current regional prices, an explicit account/operator scope, spending limit and stop deadline. Persistent call allowances and timeouts do not cap account spending or cancel dispatched provider work. Remove and reconcile the owned workload, object versions/delete markers and source foundation; retained resources can continue to cost money.
Vectametric Project Source Licence (2026-09-27): lawfully obtained original source may be copied, studied, modified and deployed for personal learning and interview preparation, including attributed personal portfolio demonstrations. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Third-party components retain their own licences. See LICENSE.txt and the Project Source Licence section of the site Terms for the full rules.
You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.
Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.
No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.
The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.
The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.
Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.
Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy