Skip to content

Repository files navigation

Hotel Pricing System — ADD 3.0 Single-Agent Architect

SA 2026 Assignment 2 · Option 2 (single-agent + self-reflection) · LLM: gpt-5.4 via OpenAI-compatible API.

What this project does

A Spring AI single-agent runs ADD 3.0 across four iterations on the Hotel Pricing System case. Each ADD step is one agent turn; the agent self-checks its output against six rules and revises if any fail. All turns are logged to logs/iterationN.jsonl (with timestamps + token counts) and rendered to logs/iterationN.md for human review.

Project layout

src/main/java/com/sa2026
  HotelPricingArchitectApp.java  Spring Boot main, parses --iterations=
  config/AgentConfig.java        Builds ChatClient and system prompt
  agent/ArchitectAgent.java      Wraps ChatClient + per-step history
  agent/ReflectionLoop.java      Forces a self-check section if missing
  log/ConversationLogger.java    JSONL + Markdown logger
  runner/IterationRunner.java    Base for each iteration
  runner/Iteration1Runner.java   Iteration 1 step prompts

src/main/resources
  application.yml                API key, base URL, model
  prompts/prior_knowledge.md     ADD 3.0 + Hotel case + iteration plan
  prompts/role_prompt.md         Architect role + behaviour rules
  prompts/self_reflection.md     R1..R6 self-check rules
  prompts/iteration1/            Iteration 1 step-by-step prompts

Run

export OPENAI_API_KEY=<TA-provided key>
export OPENAI_BASE_URL=<TA-provided endpoint>
export OPENAI_MODEL=gpt-5.4

./mvnw spring-boot:run -Dspring-boot.run.arguments="--iterations=1"

Iterations are independent agent sessions; the agent's history is reset between them. Logs land in ./logs/iterationN.{jsonl,md}.

Deliverables mapping

Deliverable Where
Source code (15 pts) src/, pom.xml
Conversation logs of 4 iterations (15 pts) logs/iteration{1..4}.{jsonl,md}
Report (20 pts) written separately from log artefacts

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages