Skip to content

Winter 2026 Changes#1

Open
lindaliu0718 wants to merge 11 commits intomainfrom
PA7_update
Open

Winter 2026 Changes#1
lindaliu0718 wants to merge 11 commits intomainfrom
PA7_update

Conversation

@lindaliu0718
Copy link

No description provided.

sunnyych and others added 9 commits February 5, 2026 16:20
updated agent.py to use Together AI API; added agent_memory.py and web_research.py (part 2 code); updated README
added more comments, added 1 more question
Updated README to include detailed instructions for the programming assignment, including setup notes, assignment parts, and specific requirements for submission.
README.md Outdated
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add these as in-line comments as well?


### Interfacing with Databases (20 points)

An important part of building a customer service agent is to be able to interface with databases to gather and record information about the user and the movies. As a starting point, implement the `book_ticket` and `file_request` tools in `agent.py` and integrate them into your agent.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have starter code for file_request, find_time, find_price, and find_balance yet. @sunnyych Could you add the starter code and code comments for these functions please?

- print request_database
```

Apart from the above transcript, you are also encouraged to add additional user questions that can showcase the use of all the tools you implemented. Make sure that you save the full trajectories of the agent's responses as we showed above in your transcript. Save the transcript as `transcript_part1.txt`.
Copy link
Author

@lindaliu0718 lindaliu0718 Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should students create the transcript.txt? I think we need to give directions. TODO @juliabiswas


Apart from the above transcript, you are also encouraged to add additional user questions that can showcase the use of all the tools you implemented. Make sure that you save the full trajectories of the agent's responses as we showed above in your transcript. Save the transcript as `transcript_part1.txt`.

## Assignment Part 2: Real-World Extensions (50 points)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making these less points since implementation is less heavy?

README.md Outdated

You will complete and run code in web_search.py for this part of the assignment. We provide most of the implementation, including the WebTools class, which enables the search functionality using the code described above. WebTools will be used in the WebSearchAgent class. Before you run the script, please remember to set the SERPAPI_API_KEY value to your api key. You will finish implementing the following three components:

1. Complete the WebSearchQA class by defining the objective of the agent and defining the input and response (hint: it might be helpful to reference the MovieTicketAgent class from agent.py)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they need to define the docstring as well? Also, can you add code comments for this function please

user_input: str = #TODO
response: str = #TODO

class WebSearchAgent(dspy.Module):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe add a comment about how this signature works (essentially WebSearchAgent is a wrapper on dspy.Module)

class WebSearchAgent(dspy.Module):
"""A ReAct agent enhanced with web search capabilities."""

def __init__(self):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think students might need more instructions on how to complete these

max_iters=6
)

def forward(self, user_input: str):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Maybe add some comments that may help the student?


### Transcript and Submission for Assignment Part 2

Similar to Part 1, include the above example queries as well as additional user questions that can showcase the use of all the tools you implemented. Save the transcript as `transcript_part2.txt`. You should make sure to showcase that the agent is able to remember past interactions with the user and use that memory to personalize the conversation, and that it can make tool calls to the web search tool and answer questions based on the latest information.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Let's clarify how they submit the transcript. Maybe pending autograder

@lindaliu0718 lindaliu0718 requested a review from sunnyych February 9, 2026 02:15
3. Finish writing the `forward` function
4. Write 5 more prompts that can test the agent's web search ability

Now, to test the agent's web search capabilities, run `python web_search.py`!
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this as a placeholder. Feel free to change this if it's not completely accurate

from mem0 import Memory

# Configure environment
os.environ["OPENAI_API_KEY"] = "your-openai-api-key"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update this to remove all the OpenAI references

class MovieTicketAgent(dspy.Signature):
"""You are a movie ticket agent that helps user book and manage movie tickets.
"""
You are a movie ticket agent that helps user book and manage movie tickets.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we give them some comments on how this docstring works? Like how the Dspy agent reads in this docstring and uses it to initialize the agent? Maybe add # comments or add something in the README

@lindaliu0718
Copy link
Author

@sunnyych I think we also need to give students directions on how to run their agent after each part


**We will use your API key to run the autograder on your submission alone. It is important that you make sure there is at least $0.1 left in your account.** If you would like to work out an alternative accomodation please make a private Ed post.

**We will use your API key to run the autograder on your submission alone. It is important that you make sure there is at least $0.1 left in your account.** If you would like to work out an alternative accomodation please make a private Ed post.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliabiswas TODO: Change this part once we figure out how we want to set up the autograder. We might have to add more info (the rubrics that we are going to use, the ethics portion, etc.) You can reference last year's PA7 README here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants