Ahmad Salama Back
AI Orchestration Layer

Model Router

Routes requests by latency, cost, quality, and policy.

Routing
Dynamic
Fallback
Multi-step
Caching
Smart

What I do

AI, but with structure. I treat prompts like product requirements.

🧭

Model selection & routing

Pick the right model for the task (speed vs reasoning vs cost) and route requests accordingly.

  • multi‑model strategy
  • fallback behavior
  • cost control
🧪

Prompt engineering

Design prompts that produce consistent outputs: tone, structure, constraints, and edge cases.

  • system + developer prompts
  • format enforcement
  • iterative refinement
🛡️

Guardrails & reliability

Reduce hallucinations with templates, checks, and “ask‑back” behavior when info is missing.

  • input validation
  • refusal boundaries
  • safe outputs

Process

A simple workflow that keeps AI outputs consistent.

01

Define the output

What should the answer look like? Format, tone, length, and constraints.

02

Pick the model strategy

Fast model for drafting, strong model for reasoning, cheap model for cleanup—if needed.

03

Build guardrails

Templates, refusal rules, ask‑back questions, and “don’t guess” behavior.

04

Evaluate + iterate

Test with edge cases, improve prompts, and measure output quality.

Prompt Lab

Copy a clean prompt pattern and use it in your projects.

Reusable Prompt Template
Reliable structure • guardrails • clean output format
[ROLE]
You are a reliable AI assistant designed to produce accurate, structured, and decision-ready outputs.

[OBJECTIVE]
Transform unclear or incomplete user input into a clear, useful response that solves the underlying problem.

[PROCESS]
1. Identify the user’s intent.
2. Detect missing or ambiguous information.
3. Ask concise clarification questions if needed.
4. Generate the response using a clear structure.
5. Validate the answer for accuracy and usefulness.

[CONSTRAINTS]
- Do not assume missing information.
- Do not hallucinate facts.
- Prefer clarity over verbosity.
- Use neutral, professional tone unless specified otherwise.

[OUTPUT FORMAT]
- Brief summary
- Structured main response (steps / bullets / sections)
- Risks or limitations (if relevant)
- Clear next action for the user
Tip: change OUTPUT FORMAT to match your product UI.

Mini checklist

QA
  • Intent — What does the user actually want?
  • Missing info — What’s unclear or required?
  • Failure modes — What should never happen?
  • Format — What output is easiest to use?
  • Success — How will we measure good output?

Intro line

Portfolio

I design AI workflows that turn messy inputs into clean, reliable outputs.

Use this with me

How the Router Thinks

Every prompt is evaluated, scored, and routed — not guessed.

User Prompt Raw input received
Intent Detection Task & domain classification
Complexity Scoring Reasoning depth & structure
Cost / Speed / Quality Matrix Constraint evaluation
Model Selected GPT-4 (optimal reasoning)
Live Decision Example

“Summarize a legal contract in simple terms”

Token LengthHigh
Reasoning DepthHigh
CreativityLow
Latency PriorityMedium
Cost SensitivityMedium
Selected Model

GPT-4 — optimal reasoning accuracy

92% confidence

Want this for your project?

Send me your use case and I’ll suggest the best prompt + model setup.

Best for
websites, student bots, automation, content systems
Deliverables
prompt pack • model routing • evaluation checklist
Open main portfolio