Agent conversations

This notebook provides sample EDSL code for creating AI agents representing survey respondents and simulating follow-on interviews with them.

EDSL is an open-source library for simulating surveys, experiments and other research with AI agents and large language models. Before running the code below, please ensure that you have installed the EDSL library and either activated remote inference from your Coop account or stored API keys for the language models that you want to use with EDSL. Please also see our documentation page for tips and tutorials on getting started using EDSL.

Importing survey data

We start by using the Conjure module to import a dataset of survey responses and convert it into EDSL objects. For purposes of demonstration we’ll use a set of mock responses to a reader survey about a home renovation newsletter:

[1]:
# "How often do you read our home renovation tips newsletter?","On a scale of 1-10, how useful do you find the content in our newsletter? (1 = Not useful at all, 10 = Extremely useful)","Would you recommend our newsletter to a friend or family member?","What topics would you like to see covered in future issues of our newsletter?"
# "Weekly",9,"Yes","More articles on upcycling old furniture, please! I'm all about that eco-friendly life."
# "Monthly",7,"Yes","How about some tips for renovating tiny apartments? Not all of us live in mansions, you know!"
# "Quarterly",4,"No","Honestly, I find most of the content too advanced. Could you include a 'Renovation 101' section for us newbies?"
# "Rarely",2,"No","Your newsletter is way too text-heavy. Ever heard of infographics? Or videos? Join the 21st century, folks!"
# "Weekly",10,"Yes","I'd kill for a deep dive into historical home restoration techniques. Let's get nerdy with it!"
# "Monthly",6,"No","Meh, it's okay. Maybe feature some celebrity home renos? That'd spice things up a bit."
# "Quarterly",8,"Yes","As a contractor, I'd love to see a section addressing common client misconceptions about renovations."
# "Weekly",9,"Yes","Your content rocks, but how about some love for us renters? Removable upgrades are my jam!"
# "Monthly",5,"No","Too many ads, not enough substance. I feel like I'm reading a catalog half the time."
# "Rarely",3,"No","Snooze fest. Where's the excitement? How about some extreme home makeover challenges?"
# "Weekly",10,"Yes","I'm obsessed with smart home tech. Can we get more articles on integrating tech into older homes?"
# "Monthly",7,"Yes","Love the newsletter, but please proofread! The typos are driving my inner grammar nerd crazy."
# "Quarterly",6,"Yes","How about a series on renovation horror stories and how to avoid them? Could be both helpful and entertaining!"
# "Rarely",1,"No","Unsubscribe button, where art thou? This newsletter is about as useful as a chocolate teapot."
# "Monthly",8,"Yes","Any chance of including a Q&A section with real architects or designers? I've got questions!"
# "Weekly",9,"Yes","More budget breakdowns, please! I want to know exactly where my renovation dollars are going."
# "Quarterly",5,"No","It's fine, I guess. But could you cover more international design trends? It's a big world out there!"
# "Monthly",7,"Yes","Hey, how about some tips for pet-friendly renovations? My cats are destroying everything!"
# "Weekly",10,"Yes","Absolutely adore your content! But I'm dying to see more about incorporating art into home design. Let's get creative!"
# "Rarely",4,"No","Too mainstream for my taste. Where are the articles on avant-garde design or extreme home modifications?"

We’ve saved the CSV at the Coop and can re-import it here:

[2]:
from edsl.scenarios.FileStore import CSVFileStore
[3]:
csv_file = CSVFileStore.pull('fa512b3e-f060-49f8-b7bf-bf20b1132ab2', expected_parrot_url='https://www.expectedparrot.com')
[4]:
# Code for uploading a CSV to the Coop:

# refresh = False
# if refresh:
#     from edsl.scenarios.FileStore import CSVFileStore
#     fs = CSVFileStore("newsletter_survey_responses.csv")
#     info = fs.push()
#     print(info)

Conjure allows us to recreate the file as EDSL objects (learn more about using Conjure):

[5]:
from edsl import Conjure
[6]:
c = Conjure(csv_file.to_tempfile())

We can inspect the questions that were in the survey:

[7]:
c.question_texts
[7]:
['How often do you read the newsletter?',
 'What topics would you like to see covered in future issues?',
 'On a scale of 1 to 10, how would you rate the overall quality of the newsletter?',
 'Which section of the newsletter do you find most valuable?',
 'What improvements would you suggest for the newsletter?']

Generating EDSL objects

The Conjure module provides methods for automatically generating Survey, Results and Agent objects from the survey data. These methods allow us to use built-in methods for analyzing the results and create AI agents representing the original survey respondents.

Recreating results

For example, we can recreate the responses as EDSL Results and sample, filter, select and print them:

[8]:
results = c.to_results()
[9]:
(results
 .sample(3)
 .select("answer.*")
 .print(format="rich")
)
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ answer                answer                answer                answer                answer              ┃
┃ .topics_would_like_…  .section_newsletter…  .improvements_would…  .scale_1_10_would_r…  .often_read_newsle… ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ Case studies on       Case Studies          More in-depth         9                     Daily               │
│ innovative                                  articles on new                                                 │
│ construction                                construction                                                    │
│ techniques are                              technologies and                                                │
│ always interesting.                         materials would be                                              │
│ Detailed breakdowns                         beneficial.                                                     │
│ of successful                               Including                                                       │
│ projects, including                         comparisons of                                                  │
│ the challenges faced                        different products                                              │
│ and solutions                               and their                                                       │
│ implemented, would                          applications would                                              │
│ be great. Interviews                        provide valuable                                                │
│ with the                                    insights. A section                                             │
│ construction teams                          dedicated to                                                    │
│ would add a personal                        frequently asked                                                │
│ touch, making the                           questions and expert                                            │
│ stories more                                advice would be a                                               │
│ relatable and                               valuable addition.                                              │
│ informative.                                                                                                │
├──────────────────────┼──────────────────────┼──────────────────────┼──────────────────────┼─────────────────────┤
│ I would love to see   Construction Tips     Adding more video     8                     Weekly              │
│ more in-depth guides                        content, such as                                                │
│ on sustainable                              tutorials and                                                   │
│ building practices.                         walk-throughs, would                                            │
│ Including case                              make the newsletter                                             │
│ studies from                                more engaging.                                                  │
│ different types of                          Summaries of key                                                │
│ projects would be                           points at the end of                                            │
│ very helpful.                               each issue would                                                │
│ Interviews with                             also be beneficial.                                             │
│ experts about their                         It would also be                                                │
│ experiences, tips,                          great to include                                                │
│ and challenges they                         downloadable                                                    │
│ faced would also be                         templates and                                                   │
│ appreciated.                                checklists for                                                  │
│ Additionally,                               various construction                                            │
│ insights into                               projects.                                                       │
│ cost-saving                                                                                                 │
│ techniques would be                                                                                         │
│ very beneficial.                                                                                            │
├──────────────────────┼──────────────────────┼──────────────────────┼──────────────────────┼─────────────────────┤
│ I would love to see   Construction Tips     Adding more video     8                     Weekly              │
│ more in-depth guides                        content, such as                                                │
│ on sustainable                              tutorials and                                                   │
│ building practices.                         walk-throughs, would                                            │
│ Including case                              make the newsletter                                             │
│ studies from                                more engaging.                                                  │
│ different types of                          Summaries of key                                                │
│ projects would be                           points at the end of                                            │
│ very helpful.                               each issue would                                                │
│ Interviews with                             also be beneficial.                                             │
│ experts about their                         It would also be                                                │
│ experiences, tips,                          great to include                                                │
│ and challenges they                         downloadable                                                    │
│ faced would also be                         templates and                                                   │
│ appreciated.                                checklists for                                                  │
│ Additionally,                               various construction                                            │
│ insights into                               projects.                                                       │
│ cost-saving                                                                                                 │
│ techniques would be                                                                                         │
│ very beneficial.                                                                                            │
└──────────────────────┴──────────────────────┴──────────────────────┴──────────────────────┴─────────────────────┘

Designing AI agents

We can also generate an AgentList for the respondents, each containing a dictionary of traits for a respondent’s survey answers and a codebook for the questions that were asked:

[10]:
agents = c.to_agent_list()

We can inspect some of them:

[11]:
agents[0:2]
[11]:
[
    {
        "traits": {
            "often_read_newsletter": "Weekly",
            "topics_would_like_see_covered": "I would love to see more in-depth guides on sustainable building practices. Including case studies from different types of projects would be very helpful. Interviews with experts about their experiences, tips, and challenges they faced would also be appreciated. Additionally, insights into cost-saving techniques would be very beneficial.",
            "scale_1_10_would_rate_overall": 8,
            "section_newsletter_find_valuable": "Construction Tips",
            "improvements_would_suggest": "Adding more video content, such as tutorials and walk-throughs, would make the newsletter more engaging. Summaries of key points at the end of each issue would also be beneficial. It would also be great to include downloadable templates and checklists for various construction projects."
        },
        "codebook": {
            "often_read_newsletter": "How often do you read the newsletter?",
            "topics_would_like_see_covered": "What topics would you like to see covered in future issues?",
            "scale_1_10_would_rate_overall": "On a scale of 1 to 10, how would you rate the overall quality of the newsletter?",
            "section_newsletter_find_valuable": "Which section of the newsletter do you find most valuable?",
            "improvements_would_suggest": "What improvements would you suggest for the newsletter?"
        },
        "edsl_version": "0.1.33.dev1",
        "edsl_class_name": "Agent"
    },
    {
        "traits": {
            "often_read_newsletter": "Monthly",
            "topics_would_like_see_covered": "I think the newsletter could benefit from a series on advanced home automation techniques. Tutorials on installing smart home devices and interviews with professionals in the field would be very useful. Additionally, I'd love to see articles on integrating renewable energy solutions into home construction.",
            "scale_1_10_would_rate_overall": 7,
            "section_newsletter_find_valuable": "Product Reviews",
            "improvements_would_suggest": "The layout of the newsletter could be improved with more visual elements like diagrams and photos. Simplifying the design for easier readability would enhance the overall experience. Including interactive elements like polls and Q&A sections would also add value."
        },
        "codebook": {
            "often_read_newsletter": "How often do you read the newsletter?",
            "topics_would_like_see_covered": "What topics would you like to see covered in future issues?",
            "scale_1_10_would_rate_overall": "On a scale of 1 to 10, how would you rate the overall quality of the newsletter?",
            "section_newsletter_find_valuable": "Which section of the newsletter do you find most valuable?",
            "improvements_would_suggest": "What improvements would you suggest for the newsletter?"
        },
        "edsl_version": "0.1.33.dev1",
        "edsl_class_name": "Agent"
    }
]

We can give the agents names for reference in conducting follow-on interviews:

[12]:
for i, agent in enumerate(agents):
    setattr(agent, 'name', f"Respondent {i+1}")
[13]:
agents[0:2]
[13]:
[
    {
        "name": "Respondent 1",
        "traits": {
            "often_read_newsletter": "Weekly",
            "topics_would_like_see_covered": "I would love to see more in-depth guides on sustainable building practices. Including case studies from different types of projects would be very helpful. Interviews with experts about their experiences, tips, and challenges they faced would also be appreciated. Additionally, insights into cost-saving techniques would be very beneficial.",
            "scale_1_10_would_rate_overall": 8,
            "section_newsletter_find_valuable": "Construction Tips",
            "improvements_would_suggest": "Adding more video content, such as tutorials and walk-throughs, would make the newsletter more engaging. Summaries of key points at the end of each issue would also be beneficial. It would also be great to include downloadable templates and checklists for various construction projects."
        },
        "codebook": {
            "often_read_newsletter": "How often do you read the newsletter?",
            "topics_would_like_see_covered": "What topics would you like to see covered in future issues?",
            "scale_1_10_would_rate_overall": "On a scale of 1 to 10, how would you rate the overall quality of the newsletter?",
            "section_newsletter_find_valuable": "Which section of the newsletter do you find most valuable?",
            "improvements_would_suggest": "What improvements would you suggest for the newsletter?"
        },
        "edsl_version": "0.1.33.dev1",
        "edsl_class_name": "Agent"
    },
    {
        "name": "Respondent 2",
        "traits": {
            "often_read_newsletter": "Monthly",
            "topics_would_like_see_covered": "I think the newsletter could benefit from a series on advanced home automation techniques. Tutorials on installing smart home devices and interviews with professionals in the field would be very useful. Additionally, I'd love to see articles on integrating renewable energy solutions into home construction.",
            "scale_1_10_would_rate_overall": 7,
            "section_newsletter_find_valuable": "Product Reviews",
            "improvements_would_suggest": "The layout of the newsletter could be improved with more visual elements like diagrams and photos. Simplifying the design for easier readability would enhance the overall experience. Including interactive elements like polls and Q&A sections would also add value."
        },
        "codebook": {
            "often_read_newsletter": "How often do you read the newsletter?",
            "topics_would_like_see_covered": "What topics would you like to see covered in future issues?",
            "scale_1_10_would_rate_overall": "On a scale of 1 to 10, how would you rate the overall quality of the newsletter?",
            "section_newsletter_find_valuable": "Which section of the newsletter do you find most valuable?",
            "improvements_would_suggest": "What improvements would you suggest for the newsletter?"
        },
        "edsl_version": "0.1.33.dev1",
        "edsl_class_name": "Agent"
    }
]

Conducting follow-on interviews

We can use the Conversation module to automate an interview with each respondent agent. To start, we can create an agent interviewer and pair it with each respondent agent:

[14]:
from edsl import AgentList, Agent
from edsl.conversation.Conversation import Conversation, ConversationList
[15]:
def interview_pair(i, agents):
    respondent = agents[i]
    interviewer = Agent(
        name = "Interviewer",
        traits = {
            "motivation": f"""
            You are conducting a follow-on interview with someone who has just
            answered a survey about a home construction newsletter.
            You want to get more details about their feedback on the newsletter.
            Here are the survey questions and the respondent's answers:
            { respondent.codebook }
            { respondent.traits }
            """
        }
    )

    return AgentList([interviewer, respondent])

Next we specify the agents and number of turns for each conversation that we want to run:

[16]:
cl = ConversationList(
    [Conversation(agent_list = interview_pair(i, agents), max_turns = 6)
    for i in range(len(agents))]
)

Now we can run the conversations and convert them into Results objects for inspection and analysis:

[17]:
cl.run()

results = cl.to_results()

To see all the components of the results that have been generated:

[18]:
results.columns
[18]:
['agent.agent_instruction',
 'agent.improvements_would_suggest',
 'agent.motivation',
 'agent.often_read_newsletter',
 'agent.scale_1_10_would_rate_overall',
 'agent.section_newsletter_find_valuable',
 'agent.topics_would_like_see_covered',
 'answer.dialogue',
 'comment.dialogue_comment',
 'generated_tokens.dialogue_generated_tokens',
 'iteration.iteration',
 'model.frequency_penalty',
 'model.logprobs',
 'model.max_tokens',
 'model.model',
 'model.presence_penalty',
 'model.temperature',
 'model.top_logprobs',
 'model.top_p',
 'prompt.dialogue_system_prompt',
 'prompt.dialogue_user_prompt',
 'question_options.dialogue_question_options',
 'question_text.dialogue_question_text',
 'question_type.dialogue_question_type',
 'raw_model_response.dialogue_cost',
 'raw_model_response.dialogue_one_usd_buys',
 'raw_model_response.dialogue_raw_model_response',
 'scenario.agent_name',
 'scenario.conversation',
 'scenario.conversation_index',
 'scenario.index']

As we did above, we can filter, sort, select and print the results. Please see documentation for examples of other analytical methods.

[19]:
(results
 .sort_by("conversation_index", "index")
 .select("conversation_index", "index", "agent_name", "dialogue")
 .print(format="rich")
)
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ scenario             scenario  scenario      answer                                                          ┃
┃ .conversation_index  .index    .agent_name   .dialogue                                                       ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 0                    0         Interviewer   Hi there! Thanks for taking the time to speak with me today     │
│                                              about the home construction newsletter. I see from your survey  │
│                                              responses that you read the newsletter weekly. That's great to  │
│                                              hear! I'd love to dive a bit deeper into your feedback. Can you │
│                                              tell me more about what you enjoy most about the "Construction  │
│                                              Tips" section and how it has been useful to you?                │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 0                    1         Respondent 1  Hi! Absolutely, I'd be happy to elaborate. The "Construction    │
│                                              Tips" section is incredibly valuable to me because it offers    │
│                                              practical, actionable advice that I can apply directly to my    │
│                                              projects. The tips are often very detailed and cover a wide     │
│                                              range of topics, which helps me stay informed about best        │
│                                              practices and new techniques in the industry. For example, I    │
│                                              recently used some of the advice on optimizing insulation       │
│                                              installation, which not only improved the energy efficiency of  │
│                                              the building but also saved on costs. It’s these kinds of       │
│                                              insights that make the section so useful.                       │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 0                    2         Interviewer   That's fantastic to hear! It sounds like the "Construction      │
│                                              Tips" section really provides you with some tangible benefits.  │
│                                              You mentioned in your survey that you'd like to see more        │
│                                              in-depth guides on sustainable building practices and case      │
│                                              studies. Could you share a bit more about what specific aspects │
│                                              of sustainable building you're most interested in, and what     │
│                                              types of projects you'd like to see featured in the case        │
│                                              studies?                                                        │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 0                    3         Respondent 1  Certainly! When it comes to sustainable building practices, I'm │
│                                              particularly interested in techniques that improve energy       │
│                                              efficiency, reduce waste, and utilize eco-friendly materials.   │
│                                              For example, I'd love to learn more about the latest            │
│                                              advancements in green insulation materials, renewable energy    │
│                                              integration like solar panels, and water conservation systems   │
│                                              such as rainwater harvesting.                                   │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 0                    4         Interviewer   Interviewer: Those are some excellent areas of interest! It’s   │
│                                              clear that sustainability is a priority for you. Regarding the  │
│                                              case studies, are there specific types of projects or scales of │
│                                              projects that you think would be most beneficial to feature?    │
│                                              For instance, would you prefer to see residential projects,     │
│                                              commercial buildings, or perhaps even large-scale community     │
│                                              developments? And are there any particular challenges or        │
│                                              successes you’d like these case studies to focus on?            │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 0                    5         Respondent 1  Respondent 1: "Great questions! I think a mix of different      │
│                                              types of projects would be really beneficial. Residential       │
│                                              projects are definitely of interest because they often have     │
│                                              unique challenges and solutions that can be applied to everyday │
│                                              construction. However, I’d also love to see commercial          │
│                                              buildings and large-scale community developments featured, as   │
│                                              they can provide insights into more complex, large-scale        │
│                                              sustainable practices.                                          │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    0         Interviewer   Hi there! Thanks for taking the time to chat with me today. I   │
│                                              see you recently completed a survey about our home construction │
│                                              newsletter. I'd love to dive a bit deeper into your feedback.   │
│                                              Is now a good time to talk?                                     │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    1         Respondent 2  Yes, now is a good time to talk. I'm happy to provide more      │
│                                              detailed feedback about the newsletter. Where would you like to │
│                                              start?                                                          │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    2         Interviewer   Interviewer: Great, thank you! Let's start with how often you   │
│                                              read the newsletter. You mentioned that you read it monthly.    │
│                                              What keeps you coming back to it each month?                    │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    3         Respondent 2  I find the newsletter quite informative and it helps me stay    │
│                                              updated on the latest trends and products in home construction. │
│                                              The product reviews are particularly valuable to me because     │
│                                              they provide detailed insights and comparisons that aid in      │
│                                              making informed decisions. I also appreciate the practical tips │
│                                              and advice that are often included.                             │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    4         Interviewer   That's great to hear that you find the product reviews and      │
│                                              practical tips so valuable! You also mentioned in the survey    │
│                                              that you'd like to see a series on advanced home automation     │
│                                              techniques and articles on integrating renewable energy         │
│                                              solutions into home construction. Could you elaborate on what   │
│                                              specific aspects of these topics interest you the most?         │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 1                    5         Respondent 2  I'm particularly interested in the practical application and    │
│                                              step-by-step guides for advanced home automation techniques.    │
│                                              For instance, tutorials on setting up smart lighting systems,   │
│                                              security cameras, and home assistants would be very useful.     │
│                                              Additionally, I’d love to read interviews with professionals    │
│                                              who can share their insights and experiences on the latest      │
│                                              trends in home automation.                                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    0         Interviewer   Hi there! Thanks for taking the time to speak with me today. I  │
│                                              see that you read the newsletter daily and have some great      │
│                                              feedback. I'd love to dive a bit deeper into your responses.    │
│                                              Could you tell me more about what you find most engaging about  │
│                                              the case studies section of the newsletter?                     │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    1         Respondent 3  Hi! Absolutely, I'd be happy to elaborate. The case studies     │
│                                              section is particularly engaging because it provides real-world │
│                                              examples of innovative construction techniques. It's            │
│                                              fascinating to see how different challenges are tackled on      │
│                                              various projects. The detailed breakdowns of successful         │
│                                              projects offer a lot of practical insights that can be applied  │
│                                              to other situations. Additionally, when the stories include     │
│                                              interviews with the construction teams, it adds a personal      │
│                                              touch that makes the content more relatable and informative.    │
│                                              It’s not just about the technical details, but also about the   │
│                                              people behind the projects and their experiences.               │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    2         Interviewer   That's great to hear! It sounds like the real-world             │
│                                              applications and personal stories really resonate with you. You │
│                                              mentioned that interviews with construction teams add a         │
│                                              personal touch. Are there specific types of questions or topics │
│                                              you'd like to see covered in these interviews to make them even │
│                                              more engaging or informative?                                   │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    3         Respondent 3  I think focusing on questions that delve into the               │
│                                              decision-making process would be really insightful. For         │
│                                              instance, understanding why certain techniques or materials     │
│                                              were chosen over others and how the team adapted to unexpected  │
│                                              challenges would be valuable. It would also be interesting to   │
│                                              hear about the lessons learned from the project and any advice  │
│                                              they might have for others facing similar situations.           │
│                                              Additionally, covering the team's dynamics, such as how they    │
│                                              collaborate and communicate, could provide a more comprehensive │
│                                              view of the project's success. Personal anecdotes about         │
│                                              overcoming specific obstacles or innovative problem-solving     │
│                                              approaches would also make the interviews more engaging.        │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    4         Interviewer   Thanks for sharing those insights! It sounds like you really    │
│                                              value the depth and practical aspects of the content. You also  │
│                                              mentioned that more in-depth articles on new construction       │
│                                              technologies and materials would be beneficial. Can you tell me │
│                                              more about what specific technologies or materials you're most  │
│                                              interested in learning about, and how you think these topics    │
│                                              could be best presented in the newsletter?                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 2                    5         Respondent 3  Sure, I'd be happy to elaborate on that. I'm particularly       │
│                                              interested in learning about sustainable construction           │
│                                              technologies and materials, such as green building materials,   │
│                                              energy-efficient systems, and renewable energy integration. It  │
│                                              would be great to see detailed articles that not only explain   │
│                                              the benefits of these technologies but also provide case        │
│                                              studies or examples of how they have been successfully          │
│                                              implemented in real projects.                                   │
│                                                                                                              │
│                                              Additionally, advancements in construction automation and       │
│                                              robotics are fascinating topics. Understanding how these        │
│                                              technologies are being used to improve efficiency, safety, and  │
│                                              quality on construction sites would be highly valuable.         │
│                                                                                                              │
│                                              To make these topics more engaging, the newsletter could        │
│                                              include comparisons of different products and technologies,     │
│                                              highlighting their pros and cons, costs, and applications.      │
│                                              Including expert opinions and insights, as well as predictions  │
│                                              for future trends, would add depth to the articles. Visual aids │
│                                              like diagrams, photos, and videos could also help illustrate    │
│                                              the concepts more clearly.                                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    0         Interviewer   Hi there! Thank you for taking the time to answer our survey    │
│                                              about the home construction newsletter. I’d like to ask you a   │
│                                              few follow-up questions to get more details about your          │
│                                              feedback. Is now a good time to chat?                           │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    1         Respondent 4  Hi! Yes, now is a good time to chat. I'm happy to provide more  │
│                                              details about my feedback.                                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    2         Interviewer   Great! I appreciate your willingness to share more insights.    │
│                                              You mentioned that you read the newsletter weekly, which is     │
│                                              fantastic to hear. Could you tell me what keeps you coming back │
│                                              to read it every week? Is there a specific aspect or feature    │
│                                              that you find particularly compelling?                          │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    3         Respondent 4  Certainly! The main reason I keep coming back to the newsletter │
│                                              every week is the "Construction Tips" section. I find it        │
│                                              incredibly valuable because it provides practical and           │
│                                              actionable advice that I can apply directly to my projects. The │
│                                              tips are often very relevant and help me stay updated with the  │
│                                              latest trends and best practices in the industry. Additionally, │
│                                              the variety of topics covered keeps it interesting and          │
│                                              informative.                                                    │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    4         Interviewer   That's wonderful to hear! It sounds like the "Construction      │
│                                              Tips" section really resonates with you. You also mentioned in  │
│                                              your survey response that you'd like to see more in-depth       │
│                                              guides on sustainable building practices, case studies, and     │
│                                              interviews with experts. Could you elaborate a bit more on what │
│                                              specific aspects of sustainable building practices you’re most  │
│                                              interested in? For example, are you looking for information on  │
│                                              materials, techniques, or perhaps something else?               │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 3                    5         Respondent 4  I'm particularly interested in sustainable building practices   │
│                                              that focus on both materials and techniques. For materials, I'd │
│                                              love to learn more about eco-friendly options that are not only │
│                                              sustainable but also cost-effective and durable. Information on │
│                                              sourcing these materials would also be helpful. As for          │
│                                              techniques, I'm keen on understanding the best practices for    │
│                                              energy efficiency, waste reduction, and water conservation      │
│                                              during construction. Additionally, insights into how to         │
│                                              integrate renewable energy systems, like solar panels or        │
│                                              geothermal heating, into building projects would be highly      │
│                                              valuable. Having case studies that showcase these practices in  │
│                                              real-world projects would provide practical examples of how     │
│                                              they can be implemented successfully.                           │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    0         Interviewer   Hi there! Thank you for taking the time to answer our survey    │
│                                              about the home construction newsletter. I appreciate your       │
│                                              feedback. I just wanted to follow up with a few more questions  │
│                                              to get a better understanding of your responses. Is now a good  │
│                                              time to chat?                                                   │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    1         Respondent 5  Sure, now is a good time to chat. I'm happy to provide more     │
│                                              feedback on the newsletter. What would you like to know?        │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    2         Interviewer   Interviewer: Great, thank you! Let's start with your suggestion │
│                                              about covering advanced home automation techniques. Can you     │
│                                              tell me a bit more about what specific topics or devices you're │
│                                              most interested in? For example, are there particular smart     │
│                                              home systems or renewable energy solutions you're curious       │
│                                              about?                                                          │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    3         Respondent 5  I'm particularly interested in smart home systems like advanced │
│                                              security systems, smart lighting, and climate control           │
│                                              solutions. It would be great to see tutorials on setting up     │
│                                              these devices, as well as tips on optimizing their use.         │
│                                              Additionally, I'm curious about integrating renewable energy    │
│                                              solutions such as solar panels and home battery storage         │
│                                              systems. Articles that cover the installation process,          │
│                                              cost-benefit analysis, and maintenance tips for these           │
│                                              technologies would be incredibly valuable.                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    4         Interviewer   Interviewer: That's fantastic feedback, thank you! It sounds    │
│                                              like you have a keen interest in both enhancing home security   │
│                                              and efficiency through smart technology, as well as             │
│                                              incorporating sustainable energy solutions. Could you share     │
│                                              what you find most challenging or confusing about these topics? │
│                                              Understanding your pain points could help us tailor the content │
│                                              to better meet your needs.                                      │
├─────────────────────┼──────────┼──────────────┼─────────────────────────────────────────────────────────────────┤
│ 4                    5         Respondent 5  One of the most challenging aspects for me is the initial setup │
│                                              and integration of various smart home devices. Often, these     │
│                                              devices come from different manufacturers, and getting them to  │
│                                              work seamlessly together can be quite confusing. Additionally,  │
│                                              understanding the long-term maintenance and troubleshooting for │
│                                              these systems is something I find daunting.                     │
└─────────────────────┴──────────┴──────────────┴─────────────────────────────────────────────────────────────────┘

Posting to the Coop

The Coop is a platform for creating, storing and sharing LLM-based research. It is fully integrated with EDSL and accessible from your workspace or Coop account page. Learn more about creating an account and using the Coop.

Here we demonstrate how to post this notebook:

[20]:
from edsl import Notebook
[21]:
n = Notebook(path = "agentifying_responses.ipynb")
[22]:
n.push(description = "Example code for creating agents for survey respondents and simulating follow-on interviews", visibility = "public")
[22]:
{'description': 'Example code for creating agents for survey respondents and simulating follow-on interviews',
 'object_type': 'notebook',
 'url': 'https://www.expectedparrot.com/content/2932971d-2e5a-42de-b5a7-ccbbfcea7247',
 'uuid': '2932971d-2e5a-42de-b5a7-ccbbfcea7247',
 'version': '0.1.33.dev1',
 'visibility': 'public'}

To update an object at the Coop:

[23]:
n = Notebook(path = "agentifying_responses.ipynb")
[24]:
n.patch(uuid = "2932971d-2e5a-42de-b5a7-ccbbfcea7247", value = n)
[24]:
{'status': 'success'}