Replace Jinja2 prompt templating with stdlib prompt composition

Open
#229 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
ai, backend

Research direction

Locate the essays, questions, and upskilling prompt composers and their prompt files, then trace how they currently render templates without changing the tutor_lib.agents boundary. Review the existing prompt-rendering tests and documentation first; done means lightweight Python composition replaces the scoped Jinja2 usage, dynamic sections render correctly, tests cover rendering, and documentation is updated.

Written by the indexing model from the issue text.

Description

Context

Jinja2 is currently imported at service startup, which is causing local failures. It is considered overkill for current prompt needs.

Scope

  • Essays, questions, and upskilling prompt composers and prompt files.
  • Remove scoped Jinja2 dependencies and mentions in documentation.

Acceptance Criteria

  • Use stdlib or simple slots for templating.
  • Dynamic sections should be built in Python.
  • Include tests for prompt rendering.
  • No changes to the tutor_lib.agents boundary.
  • Documentation must be updated.

Risks

  • Prompt drift.
  • Whitespace issues.
  • Missing placeholders.

Architecture Review

Remove Jinja2; use lightweight Builder-style prompt block functions, not Template Method inheritance.

Dominant language
Python
Stars
17
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/tutor

All issues in Azure-Samples/tutor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.