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

Cog 382 refactor demo notebook #145

Merged
merged 10 commits into from
Oct 8, 2024
Merged

Conversation

dexters1
Copy link
Collaborator

@dexters1 dexters1 commented Oct 7, 2024

Combining all demo notebooks into one single notebook

Summary by CodeRabbit

  • Documentation
    • Updated links in the README.md for the Google Colab notebook.
  • Chores
    • Deleted outdated Jupyter notebooks (cognee_demo_1.5.ipynb and full_run.ipynb) that contained examples of job descriptions and data processing tasks.

Combine all Jupyter Notebooks into one

Refactor #COG-382
Added link to google colab that uses the latest notebook

Refactor #COG-382
Copy link
Contributor

coderabbitai bot commented Oct 7, 2024

Walkthrough

The changes in this pull request involve updates to the README.md file, specifically replacing a link to a Google Colab notebook with a new URL. Additionally, two Jupyter notebooks, notebooks/cognee_demo_1.5.ipynb and notebooks/full_run.ipynb, have been deleted. The deleted notebooks contained examples and demonstrations related to job descriptions, candidate profiles, and functionalities of the cognee framework, but they are no longer part of the repository.

Changes

File Change Summary
README.md Updated link to Google Colab notebook; no other content changes.
notebooks/cognee_demo_1.5.ipynb Deleted file containing job descriptions and candidate CVs for data science positions.
notebooks/full_run.ipynb Deleted file focused on configuring and utilizing the cognee library for data processing.

Possibly related PRs

  • Fix Jupyter Notebook #142: The changes in this PR involve updates to the Jupyter Notebook that directly relate to the cognee.add function, which is also mentioned in the main PR's summary regarding the notebooks/cognee_demo_1.5.ipynb file.

Poem

In the meadow where rabbits play,
Links have changed, hip-hip-hooray!
Two notebooks hopped away,
Leaving space for new display.
With cognee we shall thrive,
In data dreams, we come alive! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a2be330 and e74f9ad.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[locale-violation] ~25-~25: In American English, “take a look” is more commonly used.
Context: ...C4TYvEvWZ?usp=sharing">notebook or have a look at our <a href="https://topoteretes.git...

(HAVE_A_LOOK)

🔇 Additional comments (1)
README.md (1)

25-25: LGTM! Please verify the new notebook link.

The update to the Google Colab notebook link aligns with the PR objective of consolidating demo notebooks. However, please ensure that:

  1. The new link is accessible and contains the consolidated demo content.
  2. All necessary information from the deleted notebooks (cognee_demo_1.5.ipynb and full_run.ipynb) is included in this new notebook.

To verify the link's accessibility and content, you can run the following command:

Consider changing "have a look" to "take a look" for consistency with American English:

-Try it in a Google collab  <a href="https://colab.research.google.com/drive/1g-Qnx6l_ecHZi0IOw23rg0qC4TYvEvWZ?usp=sharing">notebook</a>  or have a look at our <a href="https://topoteretes.github.io/cognee">documentation</a>
+Try it in a Google collab  <a href="https://colab.research.google.com/drive/1g-Qnx6l_ecHZi0IOw23rg0qC4TYvEvWZ?usp=sharing">notebook</a>  or take a look at our <a href="https://topoteretes.github.io/cognee">documentation</a>
🧰 Tools
🪛 LanguageTool

[locale-violation] ~25-~25: In American English, “take a look” is more commonly used.
Context: ...C4TYvEvWZ?usp=sharing">notebook or have a look at our <a href="https://topoteretes.git...

(HAVE_A_LOOK)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@Vasilije1990 Vasilije1990 left a comment

Choose a reason for hiding this comment

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

remove: Some common questions
This tool is not a replacement for vector databases or Langchain, it's an extension
We want to help map the old data world to the new one
Local models and evals are on the roadmap
The relationships in the graph are customizable, so is the graph model. It is something we will continue exploring

@Vasilije1990
Copy link
Contributor

Refactor the initial text you added, I think it is fine but it is a bit dated, and it could look better, and have a more consistent look. Some pics are grainy, text of different sizes, some pics have bad visibility.

I did a lot of this in 2 hours for some meetup, so would be good to give it a fresh go

@dexters1
Copy link
Collaborator Author

dexters1 commented Oct 7, 2024

Do we want to have successful code output already as part of the notebook? Or as part of the google colab?

@dexters1
Copy link
Collaborator Author

dexters1 commented Oct 7, 2024

Should we handle installation of dependencies and setting up of virtual environment as part of the Jupyter Notebook? Or just for the google colab?

@dexters1
Copy link
Collaborator Author

dexters1 commented Oct 7, 2024

What should we use regarding default databases for the Notebook? Would the following work:
Networkx for the graph database
LanceDB for the vector database
Sqlite for the relational database

@dexters1
Copy link
Collaborator Author

dexters1 commented Oct 7, 2024

os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" no longer works from python code for setting LLM key, it's only read from the .env file currently. Should we support this again? If not we need to update README and notebook

Environment variables need to be setup properly before pruning

Fix #COG-382
@Vasilije1990
Copy link
Contributor

os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" no longer works from python code for setting LLM key, it's only read from the .env file currently. Should we support this again? If not we need to update README and notebook

Hm, did you test this in collab? It should work

@Vasilije1990
Copy link
Contributor

What should we use regarding default databases for the Notebook? Would the following work: Networkx for the graph database LanceDB for the vector database Sqlite for the relational database

Yes, that is the default embedded option

@Vasilije1990
Copy link
Contributor

Should we handle installation of dependencies and setting up of virtual environment as part of the Jupyter Notebook? Or just for the google colab?

Why? It should be done with pip install cognee as a lib

@Vasilije1990
Copy link
Contributor

Do we want to have successful code output already as part of the notebook? Or as part of the google colab?

Search is included, would need to be refactored to the latest search tasks Boris deployed yesterday. Chat with him on it. fyi @borisarzentar

Copy link

gitguardian bot commented Oct 7, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9573981 Triggered Generic Password f2dfa64 notebooks/cognee_demo.ipynb View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@dexters1
Copy link
Collaborator Author

dexters1 commented Oct 8, 2024

os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" no longer works from python code for setting LLM key, it's only read from the .env file currently. Should we support this again? If not we need to update README and notebook

Hm, did you test this in collab? It should work

It's working for me now both in colab and in a local notebook, not sure why I had those issues yesterday

Removed segment regarding common questions from notebook

Refactor #COG-382
Changed text size to be more readable and uniform across the notebook

Refactor #COG-382
Added new diagram of the problems RAGs have I made with drawio

Refactor #COG-382
Refactored most common problems with LLMs to notebook

Refactor #COG-382
Refactored explanation about issues with RAGs. Added information on how results are scored.

Refactor #COG-382
Added hyperlinks to article mention

Refactor #COG-382
@Vasilije1990 Vasilije1990 merged commit 3322891 into main Oct 8, 2024
20 of 21 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.

2 participants