A student-record assistant needs an access boundary as well as a relevance score. The engineering question is concrete: which records may this authenticated request use, and where is that limit enforced?
The official regulatory sources below were accessed on November 1, 2026. These five controls are a practical review checklist. They are not a finding that every tutorial-style pipeline violates FERPA, or that installing a filter makes a deployment compliant.
Establish the permitted access first
FERPA’s definition of disclosure includes permitting access to personally identifiable information from education records. That makes the retrieval path relevant, not just the final answer. But internal retrieval, application access, and transfer to a model provider are different events; their legal treatment depends on the actual arrangements. See 34 CFR § 99.3.
Under the school-official exception, access must serve legitimate educational interests; outsourced providers must satisfy additional conditions. Section 99.31(a)(1) requires reasonable methods to control access. It does not prescribe a particular vector-search algorithm or make every internal post-filter an automatic violation.
1. Constrain the data-store query and validate the results
Build the retrieval constraint from the authorized scope before issuing the query. This reduces unnecessary data reaching the application. Verify the store’s actual filtering semantics: a query predicate does not necessarily describe the order of its internal approximate-nearest-neighbor operations.
The following is application pseudocode, because filter syntax differs by store:
scope = authorize_record_access(verified_session, requested_workflow)
documents = retrieve_with_native_scope(query, scope)
safe_documents = validate_returned_documents(documents, scope)
context = assemble_context(safe_documents)
The validation step provides another boundary before prompt assembly. It does not retroactively constrain the data-store query. Keep excluded records out of traces, caches, rerankers, and exception reports that are not authorized to receive them.
2. Bind institution and subject together
For a single-student workflow, scope both the institution and the student. Identifiers can collide across institutions. Test the same student identifier under two different institutions and verify that only the authorized records survive.
This is a design for a particular workflow, not a statement that FERPA forbids all cross-student or cross-institution access. Staff responsibilities, consent, and other permitted disclosure bases can require a different scope. Model those explicitly rather than removing the boundary to make a request work.
3. Require trusted metadata and explicit categories
Metadata is part of the authorization input. Populate it through trusted ingestion, validate its schema, and prevent an uploader or document body from declaring itself public.
Here is a runnable synthetic example using enterprise-rag-patterns. It was checked against source revision 3ab4e8a, whose package metadata is 0.48.0. PyPI availability is separate. To use that exact revision:
python -m pip install "enterprise-rag-patterns @ git+https://github.com/ashutoshrana/enterprise-rag-patterns.git@3ab4e8aeb8a1601379488b459904b9b5e7eca5c2"
from enterprise_rag_patterns.compliance import (
FERPAContextPolicy,
RecordCategory,
StudentIdentityScope,
)
scope = StudentIdentityScope(
student_id="demo-student",
institution_id="demo-institution",
requesting_user_id="demo-advisor",
authorized_categories={RecordCategory.ACADEMIC_RECORD},
)
policy = FERPAContextPolicy(scope=scope)
documents = [
{
"student_id": "demo-student",
"institution_id": "demo-institution",
"record_category": "academic_record",
"content": "Synthetic academic record",
},
{"content": "Unclassified synthetic record"},
]
safe_documents = policy.filter_retrieved_documents(documents)
assert safe_documents == [documents[0]]
This method filters documents already returned to the application. It does not query a vector store or authenticate the supplied identifiers. In the reviewed code, private records need complete identity and category fields; explicitly public documents follow a separate path with neither identity key present. That public classification must itself be trustworthy.
Category permissions are application policy. Do not present them as a universal FERPA “minimum-disclosure” formula. Some record types have different legal treatment, including treatment-record exclusions defined in § 99.3. Also, a directory_information label does not establish permission to publish: institutional designation, notice, and applicable opt-outs still matter. See the Department of Education’s FERPA regulations.
The current StudentIdentityScope.permits implementation gives directory-information categories special treatment. Deployments that must block such records need an additional explicit policy check. Do not infer opt-out enforcement from that enum.
4. Design audit delivery separately from filtering
An operational log can record the requester, protected operation, policy version, decision, actual permitted categories, and execution outcome. Avoid recording raw student content or query text unnecessarily.
FERPA recordkeeping is more specific than “log every retrieval.” Section 99.32 identifies required parties and legitimate interests, retention alongside the education records, and inspection rights. Paragraph (d) contains exceptions, including requests from or disclosures to school officials and the parent or eligible student. Broader operational logging can still be an institutional control.
FERPAContextPolicy.record_access(...) creates a record and calls its sink only when one is configured. Filtering alone does not call it. A Haystack FERPAMetadataFilter emits a disclosure_record in its result; the caller must persist it. Neither interface, by itself, proves legal sufficiency or durable delivery.
If acknowledged logging is a prerequisite for the next protected transfer, enforce that ordering and stop on failure. If logging fails after a read or write, record the actual outcome before deciding whether a retry is safe.
5. Keep authorization outside user-controlled input
Verify the session, then resolve the requester’s permitted institution, subject, and purpose on the server. A request may name the student whose record is needed, but the server must authorize that selection. A signed token also needs appropriate validation and current entitlement checks.
Do not let query text, model-generated tool arguments, or an unverified request field expand the authorized scope. Recheck it when a tool changes target records or when an agent hands work to another agent.
What the Haystack component protects
haystack-ferpa-filter is a post-retrieval component placed before prompt assembly. It validates retrieved document metadata against configured identities and categories. It does not install native retriever filters, authenticate users, or persist its emitted audit record.
Configure category restrictions explicitly: an empty authorized_categories list does not restrict categories in the reviewed implementation. Its raise_on_violation option controls whether rejected documents cause an exception or are removed; removal still prevents those documents from being returned by the component.
Verify the model input
Build a small synthetic test set containing an allowed record, another student, another institution, a denied category, missing metadata, and explicitly public content. Check the returned documents and capture the model-request payload to prove which text crosses that boundary. Test sink failures and a direct tool route that attempts to bypass the policy.
The enterprise-rag-patterns reference implementation and companion regulated-ai-governance project provide building blocks. Their value is a check you can inspect and test at a defined boundary. Legal permission, trusted configuration, and production delivery remain responsibilities of the deployed system.
Top comments (0)