An open-source platform for researchers who need to run chatbot experiments. Create a system prompt, embed an iframe in Qualtrics, and collect conversation data. Any URL parameter becomes a template variable in your prompt.
Use {{variable_name}} anywhere in your system prompt. These variables get replaced with values from URL parameters at runtime — including data piped directly from Qualtrics.
You are a chatbot assistant. The participant's name is {{name}}
and they work as a {{occupation}}.
{{#if persona}}Behave as a {{persona}} advisor.{{/if}}
Ask them about their experience in their field.In Qualtrics, add a question and paste this JavaScript in the question's JavaScript editor. It creates an iframe and passes participant data as URL parameters. Every parameter (except experiment_id and participant_id) becomes a template variable in your system prompt.
Qualtrics.SurveyEngine.addOnload(function () {
var participantId = "${e://Field/ResponseID}";
var name = "${e://Field/name}";
var occupation = "${e://Field/occupation}";
var iframeUrl =
"https://chat2survey.com/chat" +
"?experiment_id=YOUR_EXPERIMENT_ID" +
"&participant_id=" + encodeURIComponent(participantId) +
"&name=" + encodeURIComponent(name) +
"&occupation=" + encodeURIComponent(occupation) +
"&persona=friendly";
var iframe = document.createElement("iframe");
iframe.src = iframeUrl;
iframe.style.width = "100%";
iframe.style.height = "600px";
iframe.style.border = "none";
this.getQuestionContainer().appendChild(iframe);
});Qualtrics replaces ${e://Field/name} and ${e://Field/occupation} with the participant's actual responses or embedded data. Those values then fill in {{name}} and {{occupation}} in your system prompt. You can pass as many parameters as you need.
View conversations in the admin dashboard. Export all data as CSV, JSON, or JSONL. Each row includes the participant ID, message role, content, and timestamp.
{{param_name}} in your system prompt. Supports conditional blocks with {{#if var}}...{{/if}}.stanforduniversity.qualtrics.com).This is an early-stage project. If you have questions, feature requests, or run into issues, let us know.