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

Tune prompt to avoid question with in this context/in given code/in table #2107

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

chenslucky
Copy link
Contributor

@chenslucky chenslucky commented Feb 26, 2024

Description

For some text chunks, compare the questions before and after modification. Use the model "gpt-4-1106-preview". Each text chunk run 5 to 10 times continuously to verify the results.

QA 1

before question: What is the purpose of the condition_output in the given pipeline code?
before answer: The purpose of the condition_output in the given pipeline code is to selectively return one of two inputs based on a condition that is evaluated at runtime. If the condition evaluates to True, condition_output will return the first input (input_a), otherwise, it will return the second input (input_b). This allows for dynamic control of the data flow within the pipeline, depending on the results of previous tasks or workflow inputs.
after question: How does the condition_output function decide which input to return?
after answer: The condition_output function decides which input to return based on the result of a boolean condition. If the condition evaluates to True, it returns input_a; if the condition evaluates to False, it returns input_b.

QA 2

before question: What are macros used for in the context of scheduling services?
before answer: Macros are used in scheduling services to manipulate timestamps in various ways, such as adding days, hours, minutes, or seconds to a timestamp, converting time zones, extracting specific parts of a date like the day of the year, month, or week, finding the start of a month, day, or hour, formatting a timestamp into a string, and adding or subtracting time units from a timestamp. These operations help in dynamically setting the times when scheduled tasks should run or in processing time-related data within the tasks.
after question: What are the supported macros for manipulating timestamps in a schedule service?
after answer: The supported macros for manipulating timestamps in a schedule service are:\n\n- trigger_time: Time when schedule service triggered the pipeline.\n- add_days: Add a number of days to a timestamp.\n- add_hours: Add a number of hours to a timestamp.\n- add_minutes: Add a number of minutes to a timestamp.\n- add_seconds: Add a number of seconds to a timestamp.\n- convert_time_zone: Convert a timestamp from the source time zone to the target time zone.\n- day_of_year: Return the day of the year from a timestamp.\n- day_of_month: Return the day of the month from a timestamp.\n- day_of_week: Return the day of the week from a timestamp.\n- start_of_month: Return the start of the month for a timestamp.\n- start_of_day: Return the start of the day for a timestamp.\n- start_of_hour: Return the start of the hour for a timestamp.\n- format_date_time: Return the timestamp as a string in optional format.\n- add_to_time: Add a number of time units to a timestamp.\n- substract_from_time: Subtract a number of time units from a timestamp.

QA 3

before question: What does \"JOB_HEARTBEAT_TIMEOUT_SECONDS\" indicate in the context of job monitoring?
before answer: \"JOB_HEARTBEAT_TIMEOUT_SECONDS\" represents the amount of time you are willing to allow a job to run without any indication of progress before considering the resources used as wasted due to a potential hang. It is not meant to be a strict limit on the expected duration of an epoch but rather a threshold to detect and alert on job hangs without causing false positives.
after question: How should the JOB_HEARTBEAT_TIMEOUT_SECONDS be set in relation to epoch duration to avoid false alerts?
after answer: JOB_HEARTBEAT_TIMEOUT_SECONDS should be set longer than the expected duration of an epoch to prevent false positive alerts. It should be a measure of the amount of compute resources you are willing to lose while a hang goes undetected, rather than a tight limit on your epoch's expected time.

QA 4

before question: What types are supported for parallel-for output in the given mapping table?
before answer: The supported parallel-for output types are:\n\n- mltable\n- string
after question: What types are supported for parallel-for output in Azure ML pipelines?
after answer: The supported types for parallel-for output in Azure ML pipelines are mltable and string.

Test using docs: no 'in this context/in given code/in table' pattern anymore

image

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@chenslucky chenslucky requested a review from a team as a code owner February 26, 2024 06:54
@github-actions github-actions bot added the examples Improvements on examples label Feb 26, 2024
@chenslucky chenslucky merged commit c0bb62c into feature/test_data_gen Feb 28, 2024
5 checks passed
@chenslucky chenslucky deleted the chesi/tune-prompt branch February 28, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Improvements on examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants