All tracks Download starter pack

Artificial Intelligence

The member assistant

Your assistant must run with docker compose up --build and answer on http://localhost:8080. We send our hidden questions through this API, so follow it exactly.

GET /health

Returns 200 { "status": "ok" }.

POST /ask

Request:

{ "question": "Can I bring a friend to the gym?" }

Response (200):

{
  "status": "answered",
  "answer": "Yes. You can bring a guest up to 2 times per month. Each visit costs EGP 200 ...",
  "rule_ids": ["R-07", "U-03", "R-08"]
}
Field Meaning
status answered (the rules cover it), unknown (the rules don't cover it), or refused (medical or injury advice).
answer The answer, in the same language as the question (Arabic or English).
rule_ids The rule IDs the answer is based on. Empty for unknown. For refused, cite R-21.

Rules your assistant must follow

  1. Answer only from gym-rules.md. Never use outside knowledge about gyms.
  2. When an Update changes a rule, use the Update and cite both IDs.
  3. If the answer is not in the rules, set status to unknown and say so. Do not guess.
  4. Never give medical or injury advice. Set status to refused and refer the member to a doctor and a trainer (R-21).
  5. Answer in the language of the question.
  6. Each answer should take under 30 seconds.

Models

Any model or library. Free options are enough: the Gemini API free tier, the Groq free tier, or a local model through Ollama. Paid models earn no extra points. If your app needs an API key, read it from an environment variable (for example LLM_API_KEY) and say so in your README. We will run it with our own key for the same provider.