Live data from Hacker News

Generative AI Scripting

microsoft.github.io

1–10 of 60 posts

Re: Generative AI Scripting

#2
there are lots of useful parts here doesn't seem like it is Gen.AI but some other provided tool

// automatically convert to text def("PDF", env.files, { endsWith: ".pdf" }) // or parse and process const { pages } = await parsers.PDF(env.files[0])

def("DATA", env.files, { endsWith: ".csv", // take top 100 rows sliceHead: 100, }) // or parse to JavaScript object array const rows = await parsers.CSV(env.files[0])

const { files } = await workspace.grep(/[a-z][a-z0-9]+/, { globs: "*.md" })

so it seems to me these things could totally be so useful that you might use these and never care about the AI parts, at any rate I think I have to devote next week to this, as soon as the project I am on right now is shipped.

Re: Generative AI Scripting

#6

there are lots of useful parts here doesn't seem like it is Gen.AI but some other provided tool // automatically convert to text def("PDF", env.files, { endsWith: ".pdf" }) // or parse and process const { pages } = await parsers.PDF(env.files[0]) def("DATA", env.files, { endsWith: ".csv", // take top 100 rows sliceHead: 100, }) // or parse to JavaScript object array const rows = await parsers.CSV(env.files[0]) const…

Sorta-side note but for readability: To format code on HN, indent with 2 spaces.

Re: Generative AI Scripting

#7
This might be a simple question to answer but I couldn't find it from skimming these docs: what LLMs can this hook to? Do I plug an actual API key like 90% of tools? Where's the AI compute part coming from?

Re: Generative AI Scripting

#8
This looks like a useful tool but.. please review your generated docs for utility.

""" Be ambitious about what you want your script to do

Remember, LLMs in GenAIScript can do things that no other software has been able to do. Think outside the box in the ways that you use it. LLMs can critically review a document, write poetry, and analyze images, just as a starting point. They have built-in expertise on many different human endeavors, math, history, etc. and their knowledge can be easily extended by adding more context to the script input (see next point). """

This above comes under the "Best Practices" page.. why?

Re: Generative AI Scripting

#9
post #7

This might be a simple question to answer but I couldn't find it from skimming these docs: what LLMs can this hook to? Do I plug an actual API key like 90% of tools? Where's the AI compute part coming from?

Not sure on the details, but it can at least use Ollama and OpenAI. https://microsoft.github.io/genaiscript/guides/phi3-with-oll...
Post reply on HN