Meta Prompting.doc
# `Meta_prompting` – Composable Prompt Generators & Self-Improvement
> “Let the LLM write the prompt that teaches the LLM how to solve the task.”
> *— recap of the meta-prompting idea*
`Meta_prompting` is the **library layer** that introduces
* **Prompt generators** – functor [`Meta_prompt.Make`] maps a *typed* task
description to a fully-fledged prompt record. Think of it as a
*single-shot compiler* from a *domain specific record* to the markdown that
your LLM will consume.
* **Recursive refinement** – module [`Recursive_mp`] implements an iterative
loop that can call an evaluator, apply a transformation strategy and keep
the better variant. When run with an Eio environment it can delegate the
heavy lifting to OpenAI models and an optional vector database.
* **Flexible evaluation** – module [`Evaluator`] bundles a set of *judges*
(regex check, reward model, LLM ensemble, …) into an aggregate score that
drives the refinement loop.
All pieces are deliberately kept **orthogonal**: swap any evaluator, inject a
custom transformation, or re-use the monad with an *entirely different*
prompt type.
---
## Table of contents
1. [Quick start](#quick-start)
2. [API overview](#api-overview)
3. [`Recursive_mp.refine`](#recursivemprefine) – how the loop works
4. [Context retrieval & environment variables](#context-retrieval--environment-variables)
5. [Integration guide](#integration-guide)
6. [Writing a custom evaluator](#writing-a-custom-evaluator)
7. [Limitations & next steps](#limitations--next-steps)
---
## Quick start
The snippet below shows how *ten* lines of code are enough to turn a plain data
record into a ready-to-send ChatMarkdown prompt **and** run one self-improvement
cycle:when to use it
Community prompt sourced from the open-source GitHub repo dakotamurphyucf/ochat (MIT). A "Meta Prompting.doc" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
dakotamurphyucf/ochat · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar