← all repositories
brexhq/prompt-engineering

Brex open-sources its internal LLM prompt playbook

Brex published its internal guide to writing production LLM prompts after learning the hard way.

prompt-engineering
Not currently ranked — collecting fresh signals.
star history

What it does

Brex’s repo is a plain-text guide to building programmatic systems on top of large language models like GPT-4. It explains how LLMs actually work—tokens, context windows, sampling strategies—then catalogs practical tactics for structuring prompts, embedding data, and handling safety issues like prompt injection and jailbreaks. The document also walks through a detailed history of language models, from n-grams to Transformers, to ground the advice in how we got here.

The interesting bit

Most companies keep this kind of operational playbook private. Brex treats prompts as source code fed into a stochastic interpreter, and the guide openly warns that its own examples are non-deterministic—an unusual admission of humility in a field that usually pretends LLMs are deterministic APIs. The “Brief, Incomplete, and Somewhat Incorrect History” section signals the authors actually understand the stack rather than just parroting hype.

Key highlights

  • Drawn from production experience: covers programmatic consumption, citations, and embedding structured data (JSON, Markdown tables, nested objects) directly into prompts.
  • Addresses the adversarial side: explicit sections on jailbreaks, leaks, and prompt hacking that most tutorials ignore.
  • Compares tactical approaches like “Give a Bot a Fish” (semantic search) against “Teach a Bot to Fish” (command grammars, ReAct).
  • Surfaces advanced techniques: Chain of Thought, averaging multiple responses, delimiter strategies, and a frank look at fine-tuning downsides.
  • Explicitly labeled a living document, acknowledging that best practices evolve daily.

Caveats

  • No code or frameworks here—just Markdown and screenshots—so do not expect a library to import.
  • The README warns that examples were generated with non-deterministic models; copying the same prompts may yield different results.
  • The historical deep-dive, while useful context, includes a skip link for readers who just want the tactics.

Verdict

Bookmark this if you are moving beyond toy prompts and need a sober, production-minded perspective on LLM behavior. Skip it if you are hunting for an SDK or drop-in package.

Frequently asked

What is brexhq/prompt-engineering?
Brex published its internal guide to writing production LLM prompts after learning the hard way.
Is prompt-engineering open source?
Yes — brexhq/prompt-engineering is open source, released under the MIT license.
How popular is prompt-engineering?
brexhq/prompt-engineering has 9.6k stars on GitHub.
Where can I find prompt-engineering?
brexhq/prompt-engineering is on GitHub at https://github.com/brexhq/prompt-engineering.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.