Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Tips and tricks for working with Large Language Models like OpenAI's GPT-4.
| Date | Stars |
|---|---|
| 2026-07-31 | 9570 |
| 2026-08-01 | 9570 |
| 2026-08-05 | 9573 |
| 2026-08-06 | 9573 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# [Brex's](https://brex.com) Prompt Engineering Guide
This guide was created by Brex for internal purposes. It's based on
lessons learned from researching and creating Large Language Model (LLM)
prompts for production use cases. It covers the history around LLMs as well as
strategies, guidelines, and safety recommendations for working with and
building programmatic systems on top of large language models, like [OpenAI's
GPT-4](https://openai.com/research/gpt-4).
The examples in this document were generated with a non-deterministic language
model and the same examples may give you different results.
This is a living document. The state-of-the-art best practices and strategies
around LLMs are evolving rapidly every day. Discussion and suggestions for
improvements are encouraged.
## Table of Contents
- [What is a Large Language Model?](#what-is-a-large-language-model-llm)
- [A Brief, Incomplete, and Somewhat Incorrect History of Language Models](#a-brief-incomplete-and-somewhat-incorrect-history-of-language-models)
- [Pre-2000’s](#pre-2000s)
- [Mid-2000’s](#mid-2000s)
- [Early-2010’s](#early-2010s)
- [Late-2010’s](#late-2010s)
- [2020’s](#2020s)
- [What is a prompt?](#what-is-a-prompt)
- [Hidden Prompts](#hidden-prompts)
- [Tokens](#tokens)
- [Token Limits](#token-limits)
- [Prompt Hacking](#prompt-hacking)
- [Jailbreaks](#jailbreaks)
- [Leaks](#leaks)
- [Why do we need prompt engineering?](#why-do-we-need-prompt-engineering)
- [Give a Bot a Fish](#give-a-bot-a-fish)
- [Semantic Search](#semantic-search)
- [Teach a Bot to Fish](#teach-a-bot-to-fish)
- [Command Grammars](#command-grammars)
- [ReAct](#react)
- [GPT-4 vs GPT-3.5](#gpt-4-vs-gpt-35)
- [Strategies](#strategies)
- [Embedding Data](#embedding-data)
- [Simple Lists](#simple-lists)
- [Markdown Tables](#markdown-tables)
- [JSON](#json)
- [Freeform Text](#freeform-text)
- [Nested Data](#nested-data)
- [Citations](#citations)
- [Programmatic Consumption](#programmatic-consumption)
- [Chain of Thought](#chain-of-thought)
- [Averaging](#averaging)
- [Interpreting Code](#interpreting-code)
- [Delimiters](#delimiters)
- [Fine Tuning](#fine-tuning)
- [Downsides](#downsides)
- [Additional Resources](#additional-resources)
## What is a Large Language Model (LLM)?
A large language model is a prediction engine that takes a sequence of words
and tries to predict the most likely sequence to come after that sequence[^1].
It does this by assigning a probability to likely next sequences and then
samples from those to choose one[^2]. The process repeats until some stopping
criteria is met.
Large language models learn these probabilities by training on large corpuses
of text. A consequence of this is that the models will cater to some use cases
better than others (e.g. if it’s trained on GitHub data, it’ll understand the
probabilities of sequences in source code really well). Another consequence is
that the model may generate statements that seem plausible, but are actually
just random without being grounded in reality.
As language models become more accurate at predicting sequences, [many
surprising abilities
emerge](https://www.assemblyai.com/blog/emergent-abilities-of-large-language-models/).
[^1]: Language models actually use tokens, not words. A token roughly maps to a syllable in a word, or about 4 characters.
[^2]: There are many different pruning and sampling strategies to alter the behavior and performance of the sequences.
### A Brief, Incomplete, and Somewhat Incorrect History of Language Models
> :pushpin: Skip [to here](#what-is-a-prompt) if you'd like to jump past the
> history of language models. This section is for the curious minded, though
> may also help you understand the reasoning behind the advice that follows.
#### Pre-2000’s
[Language models](https://en.wikipedia.org/wiki/Language_model#Model_types)
have existed for decades, though traditional language Excerpt of 65,329 characters
Read on GitHub14
Ikko Eltociear Ashimine · Japan
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:743e273f247515f3, name:prompt engineering