genaiscript  by microsoft

GenAI scripting tool for programmatically assembling prompts for LLMs using JavaScript

created 1 year ago
2,741 stars

Top 17.7% 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

13 hours ago

Responsiveness

Inactive

Pull Requests (30d)
83
Issues (30d)
38
Star History
190 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.