marcotcr
I deleted the notebook yesterday after realizing it was weird to have a disclaimer saying 'this is our personal opinion' on a github repo under 'Microsoft'. I moved the notebook to a gist here: - https://gist.github.com/marcotcr/64ca85bd0be724f6d8fb8f1b3d2...
I didn't know we were on hackernews, otherwise I would of course not have made it a broken link :)
This morning, we put the link back, without the takeaways with our personal opinion at the end (it's still on the gist and on the blog post https://medium.com/@marcotcr/exploring-chatgpt-vs-open-sourc... )
---
prompt = guidance('''{{#system~}}
You are a helpful assistant.
{{~/system}}
{{#user~}}
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
{{~/user}}
{{#assistant~}}
Ok, I will do that. Let's do a practice round
{{~/assistant}}
{{>practice_round}}
{{#user~}}
That was great, now let's do another one.
{{~/user}}
{{#assistant~}}
Ok, I'm ready.
{{~/assistant}}
{{#user~}}
{{user_query}}
{{~/user}}
{{#assistant~}}
{{gen "query" stop="</search>"}}{{#if (is_search query)}}</search>{{/if}}
{{~/assistant}}
{{#if (is_search query)}}
{{#user~}}
Search results: {{#each (search query)}}
<result>
{{this.title}}
{{this.snippet}}
</result>{{/each}}
{{~/user}}
{{#assistant~}}
{{gen "answer"}}
{{~/assistant}}
{{/if}}''')
---
You could still write it without a DSL, but I think it would be harder to read.