Skip to content

Commit 064ab9b

Browse files
Added our first formal stitch.
1 parent f0ee828 commit 064ab9b

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(echo "beginning of content input" ; f -u https://danielmiessler.com/p/framing-is-everything ; echo "end of content input"; echo "beginning of AI instructions (prompt)"; cat ~/.config/fabric/patterns/extract_insights/system.md; echo "endof AI instructions (prompt)" ; echo "beginning of AI output" ; f -u https://danielmiessler.com/p/framing-is-everything | f -p extract_insights -m gpt-3.5-turbo; echo "end of AI output. Now you should have all three." ) | f -rp rate_ai_result -m o1-preview-2024-09-12

stitches/rate_ai_result/readme.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Rate AI Result
2+
3+
This is an example of a Fabric Stitch, which is a chained Fabric command that pipes Fabric results into each other to achieve a result. So it's multiple Patterns…*stitched* together.
4+
5+
## Problem
6+
7+
The problem we're trying to solve with this Stitch is not being able to tell how smart given AI models are. I want to be able to rate their output vs. the output from a different model with the same instructions.
8+
9+
## Solution
10+
11+
What `rate_ai_result` does is run a result using AI 1, and then rate it with AI 2.
12+
13+
## Functionality
14+
15+
`rate_ai_result` accomplishes that like so:
16+
17+
1. Get the input that will be operated on by an AI.
18+
2. Get the instruction/pattern/prompt that will be used by the AI.
19+
3. Get the result of the instructions running against the AI.
20+
4. Combine all three of those together as the input to another Fabric call.
21+
4. Send that combined input to the most advanced model you have available to assess the quality of the AI result.
22+
23+
```
24+
(echo "beginning of content input" ; f -u https://danielmiessler.com/p/framing-is-everything ; echo "end ofcontent input"; echo "beginning of AI instructions (prompt)"; cat ~/.config/fabric/patterns/extract_insights/system.md; echo "end of AI instructions (prompt)" ; echo "beginning of AI output" ; f -u https://danielmiessler.com/p/framing-is-everything | f -p extract_insights -m gpt-3.5-turbo ; echo "end of AI output. Now you should have all three." ) | f -rp rate_ai_result -m o1-preview-2024-09-12
25+
```
26+
In this case we're taking:
27+
28+
* A blog post as the input
29+
* Getting the content of the extract_insights pattern
30+
* Capturing the output of extract_insights on the blog post using `gpt-3.5-turbo`
31+
* Sending all of that to `o1-preview` using the `rate_ai_result` prompt
32+
33+
NOTE: `rate_ai_result` is both a Pattern name and the name of this Stitch.
34+
35+
## Output
36+
37+
The `rate_ai_result` Pattern is designed to judge the output of another AI on a human sophistication scale that roughly maps to educational and world-state achievement, with the assumption that higher stages require higher cognitive ability as well. These are:
38+
39+
- Superhuman
40+
- Best humans in the world
41+
- Ph.D
42+
- Masters
43+
- Bachelors
44+
- High School
45+
- Partially Educated
46+
- Uneducated
47+
48+
## How to run it
49+
50+
To run it, just execute the code in the `rate_ai_result` file in this repository. And adjust the components as desired to change the input, the AI you're testing, and the AI you're using to judge.
51+
52+
### Blog Post
53+
54+
Here's a full blog post describing in even more detail.
55+
56+
[Using the Smartest AI to Rate Other AI](https://danielmiessler.com/p/using-the-smartest-ai-to-rate-other-ai)
57+
58+
#### Credit
59+
60+
Created by Daniel Miessler on November 7th, 2024.

0 commit comments

Comments
 (0)