Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix(RAG): Fix RAG support for taxonomies with compositional skills#3060

Merged
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/instructlab:mainfrom
jwm4:jwm4-taxonomy-convertjwm4/instructlab:jwm4-taxonomy-convertCopy head branch name to clipboard
Feb 1, 2025
Merged

fix(RAG): Fix RAG support for taxonomies with compositional skills#3060
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/instructlab:mainfrom
jwm4:jwm4-taxonomy-convertjwm4/instructlab:jwm4-taxonomy-convertCopy head branch name to clipboard

Conversation

@jwm4
Copy link
Contributor

@jwm4 jwm4 commented Jan 29, 2025

This fixes a bug in RAG convert that causes it to fail on taxonomies that have compositional skills. The correct behavior is to ignore the compositional skills because they have no documents, but instead this was crashing when it encountered them. This PR also adds a compositional skill to the sample test taxonomy, which would have let us catch this bug.

Issue resolved by this Pull Request:
Resolves #3008

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Functional tests have been added, if necessary.
  • E2E Workflow tests have been added, if necessary.

Signed-off-by: Bill Murdock <bmurdock@redhat.com>
@mergify mergify bot added the testing Relates to testing label Jan 29, 2025
@jwm4 jwm4 requested a review from a team January 29, 2025 20:16
@mergify mergify bot added the one-approval PR has one approval from a maintainer label Jan 29, 2025
Copy link
Contributor

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

thank you!

@jwm4 jwm4 added RAG RAG specific issues and removed RAG RAG specific issues labels Jan 30, 2025
knowledge_files: list[Path] = []
for leaf_node in leaf_nodes.values():
knowledge_files.extend(leaf_node[0]["filepaths"])
if leaf_node and "filepaths" in leaf_node[0]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: should "filepaths" be a constant somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. Specifically, this string needs to match the string here in SDG so there should be some common set of constants that both of these pieces of code pull from for this field and for all of the others in that object. Sharing constants across core and SDG would be a big hassle, but fortunately all of that code is going to migrate to core which will make it a lot easier. For now, I will open a tech debt issue on the tracker so we don't lose track of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(BTW, rather than making these string constants, it would probably be better to make this a class with actual structured names for the fields, e.g., using typing.NamedTuple -- I will note that in the tech debt issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue is opened here: #3096

@mergify mergify bot merged commit b346054 into instructlab:main Feb 1, 2025
27 checks passed
@mergify mergify bot removed the one-approval PR has one approval from a maintainer label Feb 1, 2025
@jwm4 jwm4 deleted the jwm4-taxonomy-convert branch February 12, 2025 13:51
@courtneypacheco
Copy link
Contributor

@Mergifyio backport release-v0.23

@mergify
Copy link
Contributor

mergify bot commented Feb 17, 2025

backport release-v0.23

✅ Backports have been created

Details

courtneypacheco added a commit that referenced this pull request Feb 17, 2025
…-3060

fix(RAG): Fix RAG support for taxonomies with compositional skills (backport #3060)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ilab rag convert --taxonomy-base=empty failed

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.