surveychat is a shinychat toolkit for conversational and adaptive surveys. Participants answer in natural dialogue with a chat interface. An LLM routed through ellmer validates typed answers, extracts data, and writes adaptive questions or skips ones already answered. Each answer goes to SQL tables through a DBI connection. Earlier answers pipe into later questions, so participants get treated in context and you get richer data.
Installation
pak::pak("dylanpieper/surveychat")Example
A workshop sign-up that starts in the AI chat, with buttons to change to the form or to both side by side, which is useful while you test a survey. Choose the model with chat, as "provider/model"; the provider reads its own key, such as ANTHROPIC_API_KEY, and the model must support structured output.
surveychat::run_example("panel-chat-form", chat = "anthropic/claude-haiku-4-5")

Learn more
- Design a survey: build and run a survey
- Survey data: tables, data dictionary, and supported databases
- A chat in a sidebar: ice cream shop example, with a drawer for the answers
