Skip to content

Change prompt to try and get only topic names #623

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abhinavg4
Copy link
Collaborator

Description

Tries to fix #533. LLM gives output topics with descriptions. When we try to create a YAML, those descriptions sometimes get treated as separate topics. We modify the prompt to ask the LLM to just give the topic list.

Usage

# Add snippet demonstrating usage

Checklist

  • I am familiar with the Contributing Guide.
  • New or Existing tests cover these changes.
  • The documentation is up to date with these changes.

Copy link
Collaborator

@praateekmahajan praateekmahajan left a comment

Choose a reason for hiding this comment

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

Assuming we've tested this and it works, because your title says "to try"

@abhinavg4
Copy link
Collaborator Author

Hi yes, it works. But I said "try" since it's model-dependent.

@VibhuJawa VibhuJawa requested a review from Copilot April 18, 2025 22:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the macro topics prompt to instruct the LLM to return only topic names.

  • Updated the DEFAULT_MACRO_TOPICS_PROMPT_TEMPLATE to emphasize a list of topic names only.

Comment on lines +16 to 17
DEFAULT_MACRO_TOPICS_PROMPT_TEMPLATE = "Can you generate {n_macro_topics} comprehensive topics that encompass various aspects of our daily life, the world, and science? Your answer should be a list of only topic name(s), nothing else. Make the topics as diverse as possible.For example, 1. Food and drinks. \n2. Technology.\n"

Copy link
Preview

Copilot AI Apr 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider inserting a space after the period in 'as diverse as possible.For example' to improve readability.

Suggested change
DEFAULT_MACRO_TOPICS_PROMPT_TEMPLATE = "Can you generate {n_macro_topics} comprehensive topics that encompass various aspects of our daily life, the world, and science? Your answer should be a list of only topic name(s), nothing else. Make the topics as diverse as possible.For example, 1. Food and drinks. \n2. Technology.\n"
DEFAULT_MACRO_TOPICS_PROMPT_TEMPLATE = "Can you generate {n_macro_topics} comprehensive topics that encompass various aspects of our daily life, the world, and science? Your answer should be a list of only topic name(s), nothing else. Make the topics as diverse as possible. For example, 1. Food and drinks. \n2. Technology.\n"

Copilot uses AI. Check for mistakes.

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.

The output list length of open question pipeline is wrong ?
2 participants