GitHub - SALT-NLP/GenUI: Code for the paper: Generative Interfaces for Language Models (original) (raw)

GenUI banner

Jiaqi Chen*, Yanzhe Zhang*, Yutong Zhang, Yijia Shao, Diyi Yang

Stanford University

*Equal contribution

Homepage •**Paper** •**Dataset** •**Data Viewer**

What are Generative Interfaces?

We investigate Generative Interfaces for Language Models, a paradigm where LLMs respond to user queries by proactively generating user interfaces (UIs) to enable more adaptive, interactive interactions that better support complex user goals.

Updates

[10/07/2025] We conducted a new user study where 76 participants used their own daily queries to compare generative interfaces with conversational ones. Data is released here. Data viewer is available here.

How do Generative Interfaces work?

Setup

Prerequisites

Package Manager

API Keys

Put the following API keys in the .env file.

Authentication

LangGraph Server

LangSmith

Installation

First, clone the repository:

git clone git@github.com:SALT-NLP/GenUI.git cd GenUI

Next, install the dependencies:

After installing dependencies, set the required values (API keys, authentication information) in ./apps/web/.env.example. Then copy it to .env in the root folder of the project, and in apps/web.

The root .env file will be read by the LangGraph server for the agents.

cp ./apps/web/.env.example ./.env cp ./apps/web/.env.example ./apps/web/.env

Setup Authentication

After creating a Supabase account, visit your dashboard and create a new project.

Next, navigate to the Project Settings page inside your project, and then to the API tag. Copy the Project URL, and anon public project API key. Paste them into the NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY environment variables in the apps/web/.env file.

After this, navigate to the Authentication page and the Providers tab. Make sure Email is enabled (also ensure you've enabled Confirm Email). You may also enable GitHub, and/or Google if you'd like to use those for authentication. (see these pages for documentation on how to set up each provider: GitHub, Google)

Test Authentication

To verify authentication works, run yarn dev and visit localhost:3000. This should redirect you to the login page. From here, you can either log in with Google or GitHub, or if you haven't configured these providers, navigate to the signup page and create a new account with an email and password. This should then redirect you to a confirmation page, and after confirming your email, you should be redirected to the home page.

Setup Server

The first step to running Generating UI locally is to build the application. This is because Generating UI uses a monorepo setup and requires workspace dependencies to be built so other packages/apps can access them.

  1. Run the following command from the root of the repository:
  2. Navigate to apps/agents and run yarn dev (this runs npx @langchain/langgraph-cli dev --port 54367).

You will see something like:

Ready!
- 🚀 API: http://localhost:54367
- 🎨 Studio UI: https://smith.langchain.com/studio?baseUrl=http://localhost:54367
  1. After your LangGraph server is running, execute the following command inside apps/web to start the Generating UI frontend:

On initial load, compilation may take time.

  1. Open localhost:3000 with your browser and start trying generative interfaces.

Troubleshooting

For problems related to pdf-parse, you might refer to the solution here.

Citation

If you find this work useful for your research, please cite our GitHub repo:

@misc{chen2025generative, title={Generative Interfaces for Language Models}, author={Jiaqi Chen and Yanzhe Zhang and Yutong Zhang and Yijia Shao and Diyi Yang}, year={2025}, eprint={2508.19227}, archivePrefix={arXiv}, primaryClass={cs.CL} }