8000 Update knowledge seed examples, keep context sticky by jeff-phillips-18 · Pull Request #719 · instructlab/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update knowledge seed examples, keep context sticky #719

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

jeff-phillips-18
Copy link
Collaborator
@jeff-phillips-18 jeff-phillips-18 commented Apr 10, 2025

Closes #699
Closes #656
Closes #657

Description

Updates the Create seed data page in the Knowledge contribution wizard:

  • Uses expandable cards for each seed example
  • Updates the mechanism for selecting context from a file
  • Adds actions to clear the seed data or edit the context
  • Make the context sticky when expanded
  • Adds word counts for the questions and answers
  • When clicking outside the context text area in the context selection modal, retain the current selected text.

Screen shots

Sticky Context

ScrollingExamples

Seed example card with alert instructing user of the 250 word limit

image

Seed example card with alert displaying word count

image

Seed example card with error alert displaying word count and overage count

image

Expanded seed example card with “Show more 8000 " expandable section

image

Collapsed seed example card

image

Collapsed seed example card with error alert

image

Required field errors

image

image

Context Selection

image

image

Actions menu

image

image

image

image

@Misjohns
Copy link
Collaborator
Misjohns commented Apr 10, 2025

@jeff-phillips-18 Below are my comments:

See example cards
On the Seed example cards the text gets truncated very early. The text should expand to right margin of card.
image

Currently, the text boxes do not adjust to accommodate the text which cuts off content. Use PF autoResize text box to modify height based on contents. This would grow the box as the user types so they can see anything they enter but still provides them the ability to manually adjust the height of the text boxes in desired.
image

For the helper text, we decided to only show the # of words the associated text box container (ie. 35 words), not 35/150 words. The text field should only be marked on error if the user goes above the allotted word count. At that time we could display "0 words remaining". If we need to also display a word count then something like, "35 words / 5 words above limit" so user can easy determine the number of words they need to remove from text box. All empty text boxes in that seed example that have not been filled would display "0 words remaining" error. LMK if this is not feasible at this time. Alternatively, we could prevent the user from typing anything beyond the maximum word limit but this is not the ideal experience. @kaedward Please assist with microcopy for error message: "35 words / 5 words above limit".
image

When a seed example card is expanded all 3 QnA pairs should appear in card.
image

@jeff-phillips-18
Copy link
Collaborator Author
jeff-phillips-18 commented Apr 10, 2025

@jeff-phillips-18 Below are my comments:

See example cards On the Seed example cards the text gets truncated very early. The text should expand to right

That is only because in this example there is a newline in the copy. Here is an instance where there isn't:

image

Currently, the text boxes do not adjust to accommodate the text which cuts off content. Use [PF autoResize text box]

👍

For the helper text, we decided to only show the # of words the associated text box container (ie. 35 words), not 35/150 words. The text field should only be marked on error if the user goes above the allotted word count. At that time we could display "0 words remaining". If we need to also display a word count then something like, "35 words / 5 words above limit" so user can easy determine the number of words they need to remove from text box. All empty text boxes in that seed example that have not been filled would display "0 words remaining" error. LMK if this is not feasible at this time. Alternatively, we could prevent the user from typing anything beyond the maximum word limit but this is not the ideal experience. @kaedward Please assist with microcopy for error message: "35 words / 5 words above limit".

Yeah, I put that there so the user knows where they are over and by how much. Happy to change it however you like.

When a seed example card is expanded all 3 QnA pairs should appear in card.

This is not possible and I thought the point was to keep the context visible when entering all the answers. If we don't scroll the question and answer area we get:

image

You can see that by the time the user gets to Q and A 3, the context will be long gone

@kaedward
Copy link

@Misjohns for the "above word limit" alert, I recommend "100/99 words". The text format shouldn't change, the indicator that something is wrong is the red icon.

if we're following the pattern, the 3rd text box in the screenshot should have the help text: "0/0 words". The first help text should be "31/[number remaining] words"
image

Is this pattern overly complicated? I admit that I don't know exactly how editing a previous context would affect the following ones if you have already filled out all fields. I've never encountered this type of issue where word limit is shared between multiple fields.


I also advise against using the tooltip to show the full context that has been truncated. This might work if the full context was fewer than ~150 characters, but since the contexts can be up to 500 words, I wouldn't use the tooltip at all, even when the context is short.

Why is the context truncated when the card is expanded? I would expect the full context to be shown, instead of having an additional dropdown option to reveal the full text.

@Misjohns
Copy link
Collaborator

@kaedward The context area of the card is sticky and remains visible until the user scrolls to the bottom of the 3rd QnA for that context. By default the full context displays but we wanted the user to be able to gain some more real estate to enter their QnA pairs.

@kaedward
Copy link

@Misjohns Do we need to use the tooltip to show the full text? Since it's collapsible, it seems like the user could just use that feature instead of relying on the tooltip to see the whole context

@jeff-phillips-18
Copy link
Collaborator Author

@Misjohns @kaedward Updated per 8000 comments and updated the screen shots above. I did remove the tooltip from the truncated context. PTAL.

@jeff-phillips-18 jeff-phillips-18 force-pushed the q-and-a-updates branch 2 times, most recently from 154a1c1 to 31c9aa8 Compare April 18, 2025 18:32
@kaedward
Copy link

image

Missed this before -

"Keep all question-and-answer pairs under 250 total per example"
should change to
"The combined word count of the three question-and-answer pairs in each seed example must not exceed 250 words."

@jeff-phillips-18
Copy link
Collaborator Author

"Keep all question-and-answer pairs under 250 total per example"
should change to
"The combined word count of the three question-and-answer pairs in each seed example must not exceed 250 words."

Updated:

image

@Misjohns
Copy link
Collaborator

I think these changes look good.

Signed-off-by: Jeffrey Phillips <jephilli@redhat.com>
Copy link
Member
@vishnoianil vishnoianil left a comment

Choose a reason for hiding this comment

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

LGTM

@vishnoianil vishnoianil merged commit 10c8594 into instructlab:main Apr 22, 2025
5 checks passed
@jeff-phillips-18 jeff-phillips-18 deleted the q-and-a-updates branch April 25, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants
0