Live data from Hacker News

Generative AI Scripting

microsoft.github.io

41–50 of 60 posts

Re: Generative AI Scripting

#43

At first glance, it looks like this is almost JavaScript (or TypeScript), but with imports removed / implied. (Sort of like Arduino is almost C++.) I'm wondering if the same functionality would be available as an actual JavaScript library, or whether there is something special (other than syntactic sugar) that requires a different file type?

GenAIScript here. Yes it could be available as a library to fit but it'll require a bit of refactoring on our part.

Just throw it into o1

Re: Generative AI Scripting

#44

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Hi GenAIScript dev here, you'll find the readme at https://github.com/microsoft/genaiscript . Thanks for your feedback!

Thanks for dropping by!

I'm going to be honest, I'm still confused about what I'm looking at.

I tried listening to the NotebookLLM podcast you've embedded, which makes it sound like this is primarily directed at non-programmers (people who want to "run for the hills" when they hear the name GitHub). But then your README looks more targeted at web programmers who want to write TypeScript-like code.

When I get to the rest of the README, I'm unclear what "JavaScript-ish environment" means. Does that mean this is something like AssemblyScript, a subset of TypeScript? If so, why did you decide to do a subset instead of a library?

Addendum:

As I'm going over the README again, trying desperately to make sense of it, I found this:

> This readme is maintained by the readme-updater script.

At least I now understand my confusion.

Re: Generative AI Scripting

#45

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Given that their README is openly being maintained by an LLM [0], I wouldn't be surprised if most of the site's copy is as well. It would go a long way towards explaining why it feels even more bloated and incoherent than usual.

[0] "This readme is maintained by the readme-updater script." https://github.com/microsoft/genaiscript

Re: Generative AI Scripting

#46
post #22

This seems like it can be super useful - lot to go over but want to focus on running commands in containers. Having a clean and elegant way of executing LLM commands in a containerized environment is definitely better than running on a single VM/machine. I do wonder how something like this would run in a containerized application though - can you define the "host" to be a kubernetes control plane? Note that the conta…

One of the early ideas was to make the scripting syntax as lightweight as possible. Thus not requiring to install or import anythying to start writing a prompt (the project evolved). Definitely inspired from google/zx.

Ah thanks for clarifying. I understand the focus on being a scripting syntax first after looking at google/zx & rereading the docs.

Also had some more time to look at the code, seems like the CLI is using https://github.com/microsoft/genaiscript/blob/main/packages/... to execute scripts which uses promptrunner in core https://github.com/microsoft/genaiscript/blob/main/packages/... - it looks like it's not trivial to use directly from JS or decouple the runtime? Unless that's on the roadmap somewhere to be able to call the scripts in the same process as a Node app.

Re: Generative AI Scripting

#47
This seems like an equivalent to Mustache or Handlebars except for programmatically building prompts rather than HTML?

For example, I may be building a text game, and I may have to get rules, state, character specs, etc. Then I may have to load these things into a document as part of a prompt for the LLM to consume.

Simple, as others mentioned. But still nice to have something to reach for rather than building this myself.

Edit: And thanks! This is timely.

Re: Generative AI Scripting

#48

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Given that their README is openly being maintained by an LLM [0], I wouldn't be surprised if most of the site's copy is as well. It would go a long way towards explaining why it feels even more bloated and incoherent than usual. [0] "This readme is maintained by the readme-updater script." https://github.com/microsoft/genaiscript

I wonder how long it will go before it devolves into complete incoherence. It already seems incoherent so probably in a few updates it will be completely unreadable.

Re: Generative AI Scripting

#49
I work on building "AI" systems daily and a large part of it is assembling and managing large prompts.

I have no idea what this does. I think maybe if the examples included the output then it might be helpful?

  $`Analyze ${env.files} and report errors. Use gitmojis.`
If we knew what env.files is and what it output it would help. Does it doing some magic that looks in the file system for the files listed as env.files, combines them and passes them to the LLM? Or does the LLM write code to get the files? Or something else.

What does "Analyze" mean? I assume because of the mention of gitmojis they are code files, but maybe that assumption is wrong and it is expecting spreadsheets and can find errors in formulas? I don't know..

Edit: https://microsoft.github.io/genaiscript/blog/automatic-web-p... isn't perfect but a little bit more useful.

Re: Generative AI Scripting

#50

> Programmatically assemble prompts for LLMs using JavaScript. > $`Analyze ${env.files} and report errors. Use gitmojis.` This is kinda misleading and confusing as a lead. I could literally say: > Programmatically assemble prompts for LLMs using strings! > ... amazing! I like that they've provided ways to define schemas and standardized function-calling/tools, plus CLI helpers. But I find the page quite overwhelming…

Hi GenAIScript dev here, you'll find the readme at https://github.com/microsoft/genaiscript . Thanks for your feedback!

Can you clarify, are you also an LLM, or are you a human dev? > This readme is maintained by the readme-updater script.
Post reply on HN