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

feat: Compute edges from tags rather than storing #500

Merged
merged 14 commits into from
Jun 24, 2024
Merged

Conversation

bjchambers
Copy link
Contributor

@bjchambers bjchambers commented Jun 17, 2024

In dense graphs, there may be O(node^2) edges for tags with high connectivity. Storing the tags alone (O(tags)) allows for faster writes. We can further address dense graphs by using queries with similarity bounds and filters.

Other changes:

  • refactor: Introduce Link as interface for LinkTag This allows non-tag based links to be added in the future.
  • refactor: remove unused code
  • fix notebook to use ragstack_langchain imports

Future improvements

  • Further performance tuning of queries, including denormalization to allow for fewer queries during traversal.
  • Consider / experiment with single key queries rather than IN.

In dense graphs, there may be `O(node^2)` edges for tags with high
connectivity. Storing the tags alone (`O(tags)`) allows for faster
writes. We can further address dense graphs by using queries with
similarity bounds and filters.

Other changes:

- refactor: Introduce `Link` as interface for `LinkTag`
  This allows non-tag based links to be added in the future.
- refactor: remove unused code

Future improvements
- Further performance tuning of queries, including denormalization to
  allow for fewer queries during traversal.
- Consider / experiment with single key queries rather than `IN`.
@bjchambers bjchambers requested review from kerinin and cbornet June 17, 2024 17:29
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@bjchambers bjchambers marked this pull request as ready for review June 17, 2024 17:55
@bjchambers bjchambers merged commit 3df8b49 into main Jun 24, 2024
17 checks passed
@bjchambers bjchambers deleted the dynamic-edges branch June 24, 2024 21:37
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.

3 participants