Repository navigation
RDoc-4007/4172/4170/4164 Vector search highlighting - #2744
Danielle9897 wants to merge 14 commits into
Conversation
| collection; // string | ||
| embeddingsPathConfigurations; // EmbeddingPathConfiguration[] | ||
| embeddingsTransformation; // EmbeddingsTransformation | ||
| quantization; // VectorEmbeddingType |
There was a problem hiding this comment.
The old note that quantization can't be "Text" got dropped, and the client rejects it ("Quantization cannot be Text"). Maybe:
| quantization; // VectorEmbeddingType | |
| quantization; // VectorEmbeddingType: "Single" | "Int8" | "Binary" (not "Text"), default: "Single" |
| </Admonition> | ||
| **Chunking method syntax for the JavaScript scripts**: | ||
| // Store the text of each chunk in the embeddings document | ||
| employeeNotesTaskConfiguration.storeChunkText = true; |
There was a problem hiding this comment.
The reprocess section below says to assume this task was created with storeChunkText = false, but it reuses this same config object, which sets it to true. Either set it to false here or say there that this sample shows the end state.
There was a problem hiding this comment.
I kept storeChunkText = true in the "Store chunk text" example and changed the reprocess example to use the GetEmbeddingsFromOpenAI task from the PATHS example, which is created with storeChunkText = false.
The example now updates that task's configuration object (embeddingsTaskConfiguration),
the same way the "Modify the task" example does, so the premise matches the code.
I made the same task change in the C#, Java and Python versions, whose reprocess intro had the same contradiction.
Note:
the C#, Java and Python examples read the task's current configuration from the server and update it.
That doesn't work in Node.js: GetOngoingTaskInfoOperation returns the configuration as a plain object, not an EmbeddingsGenerationConfiguration, so it can't be passed to UpdateEmbeddingsGenerationOperation.
Looks like a client gap.
| * **Regenerate embeddings for all documents**: | ||
| This toggle appears only when editing a task. | ||
| If it is ON when you save the task, the task processes all documents in its collection again, | ||
| the same as resetting the task with `ResetEtlOperation` in the [Client API](#modify-the-task---from-the-client-api). |
There was a problem hiding this comment.
The ResetEtlOperation example is under Reprocess existing documents, so I think this link should be #reprocess-existing-documents.
| connectionString.identifier = 'id-for-open-ai-connection-string'; | ||
| // Connection string name & identifier | ||
| connectionString.name = "ConnectionStringToOpenAI"; | ||
| connectionString.identifier = "id-for-open-ai-connection-string"; |
There was a problem hiding this comment.
modelType is never set here. The client tests always set it for embeddings connection strings, so I'd add it:
| connectionString.identifier = "id-for-open-ai-connection-string"; | |
| connectionString.identifier = "id-for-open-ai-connection-string"; | |
| connectionString.modelType = "TextEmbeddings"; |
| // Default is 0 | ||
| overlapTokens, // number | ||
|
|
||
| chunkingMethod, // ChunkingMethod, default: "PlainTextSplit" |
There was a problem hiding this comment.
Small one: in Node ChunkingOptions is a plain interface, so these values aren't client defaults. The server applies them when a field is omitted. Maybe "default (server): ..."?
| const dbRecord = await documentStore.maintenance.server.send(getDatabaseRecordOp); | ||
|
|
||
| // Access the list of embeddings generation tasks | ||
| const tasks = dbRecord.embeddingsGenerations; |
There was a problem hiding this comment.
embeddingsGenerations is optional on the record type, so tasks.length can throw when there are no tasks.
| const tasks = dbRecord.embeddingsGenerations; | |
| const tasks = dbRecord.embeddingsGenerations ?? []; |
Issue link
Additional description
Documentation reorganization:
Added dedicated articles: More Querying Options, Quantization, & Vector search configuration.
Moved related material out of the dynamic-query and static-index articles.
Added dedicated articles: Chunking and Context Prefixes & Embeddings generation configuration.
Added a section about "updating an existing embeddings generation task".
New feature - Retrieve matching chunk text in vector search:
When the embeddings generation task stores chunk text,
a vector search by text can return the matching chunks of each result as highlight fragments.
include highlight(...)in both dynamic queries and static-index queries.
StoreChunkTextand reprocess documents the task has already handled.
Language updates:
C# @maciejaszyk pls review the *-csharp.mdx files
Python @poissoncorp pls review the *-python.mdx files
Java @LielNagar pls review the *-java.mdx files
Node.js @M4xymm pls review the *-nodejs.mdx files
Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI