Skip to content

Commit

Permalink
remove unused generated prompt. add unit to output
Browse files Browse the repository at this point in the history
  • Loading branch information
bassner committed Jul 19, 2024
1 parent ace007c commit 91625a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/pipeline/chat/course_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,10 @@ def get_competency_list() -> list:
]

@tool()
def lecture_content_retrieval(prompt: str) -> str:
def lecture_content_retrieval() -> str:
"""
Retrieve content from indexed lecture slides.
The query should be a natural language question that can be answered by looking into the lecture materials.
This will run a RAG retrieval on the indexed lecture slides and return the most relevant paragraphs.
This will run a RAG retrieval based on the chat history on the indexed lecture slides and return the most relevant paragraphs.
Use this if you think it can be useful to answer the student's question, or if the student explicitly asks
a question about the lecture content or slides.
Only use this once.
Expand All @@ -285,8 +284,9 @@ def lecture_content_retrieval(prompt: str) -> str:

result = ""
for paragraph in self.retrieved_paragraphs:
lct = "Lecture: {}, Page: {}\nContent:\n---{}---\n\n".format(
lct = "Lecture: {}, Unit: {}, Page: {}\nContent:\n---{}---\n\n".format(
paragraph.get(LectureSchema.LECTURE_NAME.value),
paragraph.get(LectureSchema.LECTURE_UNIT_NAME.value),
paragraph.get(LectureSchema.PAGE_NUMBER.value),
paragraph.get(LectureSchema.PAGE_TEXT_CONTENT.value),
)
Expand Down

0 comments on commit 91625a3

Please sign in to comment.