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

document vector creation #40

Merged
merged 1 commit into from
May 1, 2024
Merged

document vector creation #40

merged 1 commit into from
May 1, 2024

Conversation

swilly22
Copy link
Contributor

@swilly22 swilly22 commented May 1, 2024

Resolves: #39

Summary by CodeRabbit

  • Documentation
    • Added a new section on inserting vectors in Cypher queries, demonstrating the creation of vectors using the vecf32 function and their association with node attributes.

@swilly22 swilly22 added the documentation Improvements or additions to documentation label May 1, 2024
@swilly22 swilly22 requested a review from gkorland May 1, 2024 10:43
Copy link
Contributor

coderabbitai bot commented May 1, 2024

Walkthrough

The change introduces a new capability in Cypher queries, enabling the insertion of vectors. It showcases using the vecf32 function to create vectors and link them with node attributes, expanding data representation options in graph databases.

Changes

File Path Change Summary
cypher/index.md Added a section on inserting vectors in Cypher queries, demonstrating the use of the vecf32 function to create vectors associated with node attributes.

🐇✨
Amid nodes and edges, a dance of delight,
Vectors now weave their tale so bright.
With vecf32 in hand, a graph's new sight,
Data sings in nodes, a symphony of light.
Hop, hop, hooray for this code's flight!
🌟📊


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c80a245 and 8cfff5f.
Files selected for processing (1)
  • cypher/index.md (2 hunks)
Additional Context Used
LanguageTool (24)
cypher/index.md (24)

Near line 10: Possible spelling mistake found.
Context: ...ent: "Cypher Language" --- # Indexing FalkorDB supports single-property indexes for no...


Near line 36: It appears that a white space is missing.
Context: ...with very specific filters. An index on :employer(name), for example, will dramatically b...


Near line 43: With the plural noun ‘kilometers’, the verb inflection ‘is’ is not correct.
Context: ...` nodes within 5 kilometers of Scranton is: ```sh GRAPH.QUERY DEMO_GRAPH "WITH po...


Near line 50: Do you wish to insert an arrow?
Context: ...urrently only be leveraged with < and <= filters; matching nodes outside of the...


Near line 50: This phrase is redundant. Consider using “outside”.
Context: ...th < and <= filters; matching nodes outside of the given radius is performed using con...


Near line 89: Possible spelling mistake found.
Context: ...created_at)" ``` # Full-text indexing FalkorDB leverages the indexing capabilities of ...


Near line 90: Possible spelling mistake found.
Context: ...leverages the indexing capabilities of [RediSearch](https://redis.io/docs/interact/search-...


Near line 105: Possible spelling mistake found.
Context: ...Person', 'firstName', 'lastName')" ``` RediSearch provide 2 index configuration options: ...


Near line 108: Possible missing comma found.
Context: ...fine which language to use for stemming text which is adding the base form of a word...


Near line 109: Possible spelling mistake found.
Context: ...ts for "go" and "gone", for example. 2. Stopwords - These are words that are usually so c...


Near line 111: Possible spelling mistake found.
Context: ...sing German language and using custom stopwords of all nodes with label Movie, use th...


Near line 116: Possible spelling mistake found.
Context: ...topwords: ['a', 'ab'] }, 'title')" ``` RediSearch provide 3 additional field configuratio...


Near line 120: Possible spelling mistake found.
Context: ... importance of the text in the field 2. Nostem - Skip stemming when indexing text 3. P...


Near line 193: Possible missing comma found.
Context: ...h the introduction of the vector data-type a new type of index was introduce. A ve...


Near line 193: Consider using either the past participle “introduced” or the present participle “introducing” here.
Context: ...ctor` data-type a new type of index was introduce. A vector index is a dedicated index fo...


Near line 196: Possible missing comma found.
Context: ...through vectors To create this type of index use the following syntax: ```cypher CR...


Near line 216: Possible missing comma found.
Context: ...larityFunction:'euclidean'} ``` Please note when creating a vector index both the v...


Near line 217: For conciseness, consider replacing this expression with an adverb.
Context: ...d similarity function must be provided. At the moment the only supported similarity function ...


Near line 217: The adjective “Euclidean” is typically capitalized.
Context: ... only supported similarity function is 'euclidean'. ## Inserting vectors To create a ne...


Near line 235: Possible missing comma found.
Context: ...s a measure of "distance" To query the index use either db.idx.vector.queryNodes f...


Near line 235: Possible spelling mistake found.
Context: ...istance" To query the index use either db.idx.vector.queryNodes for node retrieval o...


Near line 235: Possible spelling mistake found.
Context: ...ector.queryNodesfor node retrieval ordb.idx.vector.queryRelationships` for relation...


Near line 273: Possible missing comma found.
Context: ...ting a vector index To remove a vector index simply issue the drop index command a...


Near line 279: After the expression ‘for example’ a comma is usually used.
Context: ..._pattern> (<entity_attribute>) ``` For example to drop the vector index over Product d...

Additional comments not posted (2)
cypher/index.md (2)

217-217: Capitalize "Euclidean" to adhere to standard conventions.


221-221: Consider adding a brief description or a direct link to the vecf32 function documentation for clarity.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Out of diff range and nitpick comments (3)
cypher/index.md (3)

Line range hint 193-193: Consider revising the verb tense for clarity.

- With the introduction of the `vector` data-type a new type of index was introduce.
+ With the introduction of the `vector` data-type, a new type of index was introduced.

Line range hint 279-279: Add a comma after "for example" for better readability.

- For example to drop the vector index over Product description invoke:
+ For example, to drop the vector index over Product description invoke:

Line range hint 235-235: Consider explaining the parameters used in the db.idx.vector.queryNodes and db.idx.vector.queryRelationships functions for better user understanding.

Would you like me to add detailed descriptions for each parameter used in these functions?

@@ -216,6 +216,17 @@ CREATE VECTOR INDEX FOR ()-[e:Call]->() ON (e.summary) OPTIONS {dimension:128, s
Please note when creating a vector index both the vector dimension and similarity function
must be provided. At the moment the only supported similarity function is 'euclidean'.
Copy link
Contributor

Choose a reason for hiding this comment

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

Capitalize "Euclidean" to adhere to standard conventions.

- the only supported similarity function is 'euclidean'.
+ the only supported similarity function is 'Euclidean'.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
must be provided. At the moment the only supported similarity function is 'euclidean'.
must be provided. At the moment the only supported similarity function is 'Euclidean'.

cypher/index.md Outdated
@@ -216,6 +216,17 @@
Please note when creating a vector index both the vector dimension and similarity function
must be provided. At the moment the only supported similarity function is 'euclidean'.

## Inserting vectors

To create a new vector use the [vecf32](https://docs.falkordb.com/cypher/functions.html#vector-functions) function
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a brief description or a direct link to the vecf32 function documentation for clarity.

Would you like me to add a brief explanation or find a suitable link for the vecf32 function documentation?

@swilly22 swilly22 force-pushed the vector-creation-doc branch from 1a5aa03 to 8cfff5f Compare May 1, 2024 10:49
@swilly22 swilly22 merged commit 2497e38 into main May 1, 2024
1 check passed
@swilly22 swilly22 deleted the vector-creation-doc branch May 1, 2024 10:51
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Out of diff range and nitpick comments (3)
cypher/index.md (3)

Line range hint 193-193: Consider using the past participle "introduced" for grammatical correctness.

- With the introduction of the `vector` data-type a new type of index was introduce.
+ With the introduction of the `vector` data-type a new type of index was introduced.

Line range hint 235-235: Consider adding a comma after "distance" for better readability.

- To query the index use either `db.idx.vector.queryNodes` for node retrieval or `db.idx.vector.queryRelationships` for relationships.
+ To query the index, use either `db.idx.vector.queryNodes` for node retrieval or `db.idx.vector.queryRelationships` for relationships.

Line range hint 279-279: After "For example," a comma is usually used for better readability.

- For example to drop the vector index over Product description invoke:
+ For example, to drop the vector index over Product description invoke:

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

Successfully merging this pull request may close these issues.

Document vector creation
2 participants