Skip to main content

Validating YAML Preview in Docusaurus

· One min read

Are you managing your prompts for generative AI properly?

Although most generative AI platforms retain prompt histories, using prompts across different AIs can become a bit frustrating.
At such times, I came across an article suggesting that managing prompts in YAML format can be effective.

  1. A Beginner’s Guide to Prompt Engineering in YAML Format
    1. https://note.com/novapen_create/n/n2c273166aef4

Thanks to Nopapen for the great article.

That got me thinking—“Maybe Docusaurus could be a convenient tool to preview YAML?”
So, I decided to explore the idea.


Conclusion

The rendering result in Docusaurus was fairly decent.

Related article: Various Ways to Preview YAML

Here are the key points from this experiment:

  1. I want to manage prompts a bit more robustly
    1. 👉 Use GitHub
  2. I want to fold/unfold long prompts for large YAML files
    1. 👉 Use react-json-tree to build a component
      1. 👉 It worked!
  3. I want to template and reuse prompts flexibly
    1. 👉 Confirmed this is doable thanks to Nopapen’s article above

Next, I’m planning to create a prompt management repository.
If I find the need to improve features, I’ll extend it from there.