Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DST-198: add llm selection tool and base transcript #22

Merged
merged 6 commits into from
May 7, 2024

Conversation

ccheng26
Copy link
Collaborator

@ccheng26 ccheng26 commented May 6, 2024

Ticket

Resolves DST-198: base code for processing transcripts

Changes

  • added prompt for transcript
  • added selection for openhermes, dolphin, gemini, gpt 3.5 and gpt 4

Context for reviewers

Logged preliminary results of summarization (stuffing) here

Testing

Testing instructions and expected behavior:

  1. pip install -r requirements.txt
  2. Update .env with GOOGLE_API_KEY and OPEN_AI_API_KEY
  3. Download models openhermes ollama pull openhermes and dolphin LLM using Ollama: ollama pull dolphin-mistral (Install Ollama from https://ollama.ai/)
  4. python run.py
    Review results compared to evaluation chart

04-call-summaries/llm.py Outdated Show resolved Hide resolved
04-call-summaries/llm.py Outdated Show resolved Hide resolved
04-call-summaries/llm.py Outdated Show resolved Hide resolved
04-call-summaries/llm.py Outdated Show resolved Hide resolved
04-call-summaries/run.py Outdated Show resolved Hide resolved
"""

prompt = """
You are a helpful AI assistant who will summarize this transcript {transcript}, using the following template:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that transcript is a multiline text with lots of blank lines, which will break up this sentence. Instead, say something like ... summarize the given transcript using this template: ... then specify the transcript text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried this with openhermes and dolphin prior to commiting and it did not follow the format outlined.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That might be due to recency bias. Try putting the template at the end of the prompt.

Copy link
Collaborator

@yoomlam yoomlam left a comment

Choose a reason for hiding this comment

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

Approve! pending fix for pylint finding

04-call-summaries/llm.py Outdated Show resolved Hide resolved
@ccheng26 ccheng26 merged commit ba18b55 into main May 7, 2024
2 checks passed
@ccheng26 ccheng26 deleted the DST-198-basecodeForTranscripts branch May 7, 2024 21:44
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.

2 participants