Skip to content

Conversation

@manel1874
Copy link
Contributor

This PR adds async call to nildb nodes when nilrag is executed.

It also adds:

  • Inversion optimization from @jfdreis
  • Hidden flag to choose the number of chunks to retrieve for RAG. I am calling this variable num_chunks.

@manel1874 manel1874 marked this pull request as ready for review April 4, 2025 16:18
# Step 3: Ask NilDB to compute the differences
logger.debug("Requesting computation from NilDB...")
difference_shares = nilDB.diff_query_execute(nilql_query_embedding)
difference_shares = await nilDB.diff_query_execute(nilql_query_embedding)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Could we have type information for difference_shares?

It would mean adding something like: difference_shares: Dict[int, Dict[int, int]] if each entry contains an int id and the difference between each id and others. It improves readability.

Copy link
Member

@jcabrero jcabrero left a comment

Choose a reason for hiding this comment

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

👍

If you want to add the small nit on the other PR for the new types, I think that is fine. Just leaving it here for the record.

For the rest the PR looks good to me.

@jcabrero
Copy link
Member

jcabrero commented Apr 8, 2025

The PR is failing because of the formatting. You can do uv run ruff format and it will pass the first tests.

@manel1874 manel1874 merged commit 103d50b into main Apr 8, 2025
4 checks passed
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.

4 participants