Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
klntsky committed Nov 15, 2024
1 parent 01cbb32 commit e94a2f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
28 changes: 11 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

Metaprompt is a template language for LLM prompt automation, reuse and structuring, with support for writing prompts with prompts.

It adds a number of syntactic constructs to plaintext prompts:
It adds a number of syntactic constructs to plaintext prompts, that get expanded at run time, producing textual output:

- variables
- conditionals
- LLM calls
- function calls
- meta-prompting operator
- etc.

These constructs get expanded at run time, producing textual output.

# Project status

**!!! This is an early work-in-progress !!!**
Expand All @@ -36,14 +34,14 @@ Prompt rewriting is a technique of asking an LLM to create/modify/expand an LLM

- Dynamically crafting task-specific prompts based on a set of high level principles
- Modifying prompts to increase accuracy
- Securing inputs from prompt injection attacks
- Selecting the most suitable model based on prompt contents
- Securing inputs from prompt injection attacks and for content moderation
- Selecting the most suitable model based for a task

Quick example:

```metaprompt
[$ You are an LLM prompt engineer.
Improve this prompt by adding specific instructions:
Improve this prompt by adding specific details:
[:prompt]
]
```
Expand All @@ -52,16 +50,12 @@ Quick example:

A module system and a package system enable parameterized prompt reuse and publishing.

`hello.metaprompt`:

```metaprompt
Hello, [:what]!
```
## Knowledge base maintenance

`main.metaprompt`:
Organize your knowledge base in the form of multiple documents loaded conditionally on demand.

```metaprompt
[:use ./hello :what=world]
```
# Links

`main.metaprompt` will evaluate to `Hello, world!`
- [GitHub repo](https://github.com/promptware/metaprompt)
- [Documentation](https://docs.metaprompt-lang.org/)
- [Author's twitter](https://x.com/klntsky)
1 change: 1 addition & 0 deletions python/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ async def _main():
def main():
asyncio.run(_main())


if __name__ == "__main__":
main()

0 comments on commit e94a2f7

Please sign in to comment.