genaiscript  by microsoft

GenAI scripting tool for programmatically assembling prompts for LLMs using JavaScript

Created 2 years ago
2,792 stars

Top 17.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

GenAIScript is a framework for programmatically assembling and orchestrating prompts for Large Language Models (LLMs) using JavaScript or TypeScript. It targets developers and researchers building AI-powered applications, enabling them to create complex LLM workflows with features like tool integration, data manipulation, and structured output generation.

How It Works

GenAIScript leverages a JavaScript/TypeScript DSL with template tags and functions like $ for prompt creation and def for context injection. It abstracts LLM interactions, allowing developers to define prompts, integrate data from various sources (files, databases, APIs), specify output schemas for validation and repair, and register custom tools or agents. This approach aims to provide a more structured, testable, and maintainable way to develop LLM applications compared to traditional prompt engineering.

Quick Start & Requirements

Highlighted Details

  • Supports multiple LLM providers including OpenAI, Azure OpenAI, Anthropic, GitHub Copilot, and local models via Ollama.
  • Built-in capabilities for ingesting and processing various data formats like PDFs, DOCX, CSV, and XLSX.
  • Features LLM composition, code interpreters, containerized execution, and RAG capabilities.
  • Includes integrated testing and evaluation powered by promptfoo, and secret scanning.

Maintenance & Community

The project is actively maintained by Microsoft, with contributions welcomed. Links to documentation, a blog, and YouTube channels are provided for community engagement and learning.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

While comprehensive, the framework's complexity might present a learning curve. Some advanced features like containerized execution or specific model integrations may require additional setup or dependencies.

Health Check
Last Commit

21 hours ago

Responsiveness

1 day

Pull Requests (30d)
28
Issues (30d)
13
Star History
32 stars in the last 30 days

Explore Similar Projects

Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic), Nat Friedman Nat Friedman(Former CEO of GitHub), and
39 more.

aider by Aider-AI

0.4%
37k
AI pair programming in your terminal
Created 2 years ago
Updated 1 week ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
20 more.

dify by langgenius

0.5%
114k
Open-source LLM app development platform
Created 2 years ago
Updated 16 hours ago
Feedback? Help us improve.