Finalize GenAI exam: simplify qabilah+q2, add q5 LangChain agent
هذا الالتزام موجود في:
50
q5-llm-agent/llm-agent.md
Normal file
50
q5-llm-agent/llm-agent.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Q5 — Build a simple LLM agent with LangChain (on Ghaymah's GenAI services)
|
||||
|
||||
⏱ **Budget: ~9 minutes** · Weight: 20%
|
||||
|
||||
## The task
|
||||
|
||||
Build a small **LLM agent** using **LangChain**, and point it at **Ghaymah's GenAI services** (the ready-to-use LLM models you saw in the dashboard).
|
||||
|
||||
Requirements:
|
||||
|
||||
1. Use LangChain (Python) with an **OpenAI-compatible** client pointed at Ghaymah's inference endpoint. Get the **base URL**, **API key**, and a **model ID** from https://deploy.ghaymah.systems (see the AI / models section).
|
||||
2. Give the agent **at least one tool** — e.g. a calculator, a "save note" memory tool, or a tiny retrieval tool.
|
||||
3. (Optional, +bonus) Wire it to the static site from **Q4** — the page calls your agent's endpoint and shows the reply.
|
||||
|
||||
There's a starter `agent.py` + `requirements.txt` in this folder you may extend or replace.
|
||||
|
||||
## Deliverable
|
||||
|
||||
Fill in the template below and commit your code in this folder.
|
||||
|
||||
---
|
||||
|
||||
## ANSWER — LangChain agent
|
||||
|
||||
### 1. What my agent does
|
||||
|
||||
> _one or two lines_
|
||||
|
||||
### 2. Architecture (LangChain components)
|
||||
|
||||
| Component | What I used |
|
||||
|---|---|
|
||||
| Model (LLM) | |
|
||||
| Tool(s) | |
|
||||
| Prompt | |
|
||||
| Executor | |
|
||||
|
||||
### 3. How it uses Ghaymah's GenAI services
|
||||
|
||||
> _base URL pattern, model ID, how you got the key (do not paste the key)_
|
||||
|
||||
### 4. Code
|
||||
|
||||
> _commit your code in this folder (agent.py etc.) and reference it here_
|
||||
|
||||
### 5. How to run / deploy it
|
||||
|
||||
```bash
|
||||
# commands
|
||||
```
|
||||
المرجع في مشكلة جديدة
حظر مستخدم