Upload documents to your project
Open Foundry > your project > Data + indexes. Upload the 3-5 documents. Foundry will create a searchable index named like idx-campus-faq.
All labs · Lab 4 of 5 · Half day
Upload a small document set, retrieve relevant passages, and produce grounded answers with source references.
Open Foundry > your project > Data + indexes. Upload the 3-5 documents. Foundry will create a searchable index named like idx-campus-faq.
Use the Foundry chat-with-your-data endpoint or the Python sdk's data_sources parameter to send the index name with every query.
response = client.chat.completions.create(
model=os.environ["AZURE_OPENAI_DEPLOYMENT"],
messages=[
{"role": "system", "content": SYSTEM},
{"role": "user", "content": user_query},
],
extra_body={
"data_sources": [{
"type": "azure_search",
"parameters": {
"endpoint": os.environ["AZURE_SEARCH_ENDPOINT"],
"index_name": "idx-campus-faq",
"authentication": {"type": "api_key", "key": os.environ["AZURE_SEARCH_KEY"]},
},
}],
},
) Foundry returns a citations array. Print citation titles alongside the answer.
Pick three real questions a TIU student would ask. Note answer correctness, citation correctness, and refusal correctness for an out-of-scope query.
When all three (or more) of these are true, you can mark the lab complete and move on.
Small RAG (5 docs, 20 queries) costs roughly 1,500-3,000 KRW. Indexing is one-time; queries are metered per call.
Only upload public documents. Do not upload student records, grades, or personal contact info. Each citation should be reviewable by a tutor.
Hackathon connection
Sample repo — RAG example