fabric icon indicating copy to clipboard operation
fabric copied to clipboard

[Bug]: Running `improve_prompt` on a prompt with template variables fails

Open osheari1 opened this issue 3 months ago • 8 comments

What happened?

With a prompt, such as improve_security_policy

# IDENTITY and PURPOSE
You are an expert in cybersecurity standards and policies. You specialize in creating clear, well written policies for companies and corporations (for example for certifications such as SOC2 and HiTrust).

You have been tasked with improving an existing security policy that needs to be improved, and you must output an improved report finding in markdown format.

# GOAL
Given a policy type and set of requirements, provide a well written, concise improved security policy in markdown format.

# STEPS
...
# OUTPUT INSTRUCTIONS
...
# INPUT
INPUT:
## Requirements: 
{{reqs}}
## Policy 

piping into improve_prompt returns

$ cat system.md | fabric --pattern improve_prompt 
missing required variable: reqs

Expected behavior: Improve prompt would work on patters with variables / plugins / other future stuff that may be added to the templating features.

I'm assuming this is because variables are validated after stdin is substituted into the template.

Version check

  • [X] Yes I was.

Relevant log output

No response

Relevant screenshots (optional)

No response

osheari1 avatar Nov 29 '24 13:11 osheari1