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

Implement inference caching while knowledge graph generation #223

Open
4 tasks
dhirenmathur opened this issue Jan 9, 2025 · 2 comments
Open
4 tasks

Implement inference caching while knowledge graph generation #223

dhirenmathur opened this issue Jan 9, 2025 · 2 comments

Comments

@dhirenmathur
Copy link
Contributor

Implement Hash-Based Caching for Knowledge Graph Nodes

Objective

Optimize knowledge graph generation across branches by implementing hash-based caching for node inference and embeddings.

Current Behavior

  • Complete knowledge graph regeneration for each new branch
  • Redundant inference generation for unchanged nodes

Proposed Solution

  • Calculate and store hash for each node in graph
  • Compare node hashes between branches
  • Reuse inference and embeddings for matching hashes
  • Generate new inference only for modified nodes

Implementation

  1. Add hash generation for nodes
  2. Store hashes in graph structure
  3. Implement hash comparison system
  4. Add cache lookup before inference
  5. Copy matching node data from cache

Success Criteria

  • Hash generation working correctly
  • Cache hit/miss working as expected
  • Faster graph generation for similar branches
  • No loss in inference quality
@dhirenmathur
Copy link
Contributor Author

/bounty 10

Copy link

algora-pbc bot commented Jan 9, 2025

💎 $10 bounty • potpie.ai

Steps to solve:

  1. Start working: Comment /attempt #223 with your implementation plan
  2. Submit work: Create a pull request including /claim #223 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to potpie-ai/potpie!

Add a bountyShare on socials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant