Fine-tuned from
Qwen/Qwen3-Embedding-4B for
regulatory document retrieval as part of a Multi-Agent Debate (MAD) Guardrails system developed at SJSU.
This model serves as the retrieval backbone in a RAG pipeline that provides ground truth for agent debates on AI governance and regulatory compliance.
Evaluated on a 4-candidate reranking task (1 positive + 3 hard negatives) with 864 val / 864 test samples.
1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer(
4 "vineeth453/qwen3-4b-guardrails-embedding-v1",
5 trust_remote_code=True
6)
7model.max_seq_length = 512
8
9# Queries require the instruction prefix
10QUERY_INSTRUCTION = (
11 "Instruct: Retrieve relevant regulatory passage to answer the query\n"
12 "Query: "
13)
14
15# Passages are encoded without any prefix
16query = QUERY_INSTRUCTION + "What are the documentation requirements for high-risk AI systems?"
17chunks = [
18 "EU AI Act Article 11 requires providers of high-risk AI systems to draw up technical documentation...",
19 "NIST AI RMF suggests organizations establish governance structures for AI risk management..."
20]
21
22query_emb = model.encode([query], normalize_embeddings=True)
23chunk_emb = model.encode(chunks, normalize_embeddings=True)
24scores = query_emb @ chunk_emb.T
25print(scores)
Pipeline: User query → RAG retrieval (this model) → Ground truth chunks → Agent debate → Guardrail verdict
Apache 2.0 — same as base model.