Nobody realizes that books published on Amazon can make over $100,000/year…
But I’ll show you exactly how to do this (without writing the books).
(Trust me, you’ll want to bookmark this)
The xAI API is incredible.
I just created an AI assistant that can fetch news content from URLs and write a post about it on my own writing style.
Super simple to set up and you can try free. Here’s how:
MIND-BENDING 🧠
1954: A scientist created a tank to "turn off" reality.
He stayed in it for 48 hours with:
• No light
• No sound
• No gravity
What he discovered?
The CIA classified it as "too dangerous for humanity":
Prompt engineering requires a lot of manual effort. Here are four automatic prompt optimization algorithms that can help to improve your prompt with minimal effort…
(1) Automatic Prompt Engineer (APE) [1] searches over a pool of prompts proposed by an LLM–usually ~32-64 prompts–to find the prompt that performs best. This setup uses separate LLMs to propose and evaluate prompts. For evaluation, we generate output via zero-shot inference and evaluate the output according to a chosen scoring function. Despite its simplicity, APE is shown to find prompts that match or surpass human-written prompts.
(2) Automatic Prompt Optimization (APO) [2] performs a more directed search compared to APE, which simply proposes and evaluates a bunch of prompts in one pass. We use batches of training data to derive “gradients”—just text-based critiques of the current prompt’s mistakes—that guide edits / improvements to the prompt. Then, we form a recursive feedback loop by:
1. Collecting errors made by the current prompt on the training data.
2. Summarizing these errors via a natural language gradient.
3. Using the gradient to generate several modified versions of the prompt.
4. Selecting the best of the edited prompts.
5. Repeating this process several times.
(3) Gradient-free Instructional Prompt Search (GrIPS) [3] uses heuristics to edit prompts instead of prompting an LLM to generate new prompts. All edits–including deletion, swap, paraphrase, and addition–are performed at the phrase level. Only phrases that are previously deleted are considered for addition, and paraphrase operations simply prompt an LLM to paraphrase a phrase. With these edit operations, we can form a prompt optimization strategy by continually editing a set of prompts and selecting those with the best performance.
(4) Optimization by Prompting (OPRO) [4] is a generic, gradient-free optimization algorithm that operates by:
- Describing an optimization task in natural language.
- Showing an optimizer LLM examples of prior solutions to the optimization task along with their objective values.
- Asking the optimizer LLM to infer new / better solutions to the problem.
- Testing the inferred solutions via an evaluator LLM.
One of the most notable applications of OPRO is prompt optimization. The key component of this algorithm is the optimizer LLM, which receives a meta-prompt that contains all information necessary for the LLM to generate a new / better prompt; e.g., prior prompts, prompt performance metrics, few-shot examples of the task, and more. We optimize a prompt by updating this meta-prompt to propose new / better prompts over time.
More details. To learn more about prompt optimization algorithms, check out the overview that I just wrote of this topic (link in image). It outlines most of the literature in this space, including anything from "soft" prompts that are trained via gradients to LLM-based prompt optimizers.
Ancient Greek thinkers like Socrates and Plato hated democratic elections.
They saw democracy as part of an endless cycle of regimes — destined to slip into mob rule.
But Polybius knew how to break the cycle... (thread) 🧵