Explain _additional vector returned response like i am 5

Not understanding the difference in these returned responses:

Using the jeopardy quickstart example…

1/ I set up the collection with a standard cohere embedding (no named vectors)

  const questions = await weaviateClient.collections.create({
    name: "Question",
    vectorizers: vectorizer.text2VecCohere({
      model: "embed-english-light-v3.0",
    }),
  });
  console.log(`Collection ${questions.name} created!`);
}

2/ In my script I insert toy data and query the objects:

const myCollection = weaviateClient.collections.get("Question");

const result = await myCollection.query.fetchObjects({
  includeVector: true,
  limit: 1,
});

console.log("this is the fetch objects: ", JSON.stringify(result, null, 2));

which results in:

this is the fetch objects:  {
  "objects": [
    {
      "metadata": {},
      "properties": {
        "answer": "the atmosphere",
        "category": "SCIENCE",
        "question": "Changes in the tropospheric layer of this are what gives us weather"
      },
      "uuid": "0119e108-5461-48c0-8d28-b8606cd57a83",
      "vectors": {
        "default": [
          -0.06719970703125,
          0.0239715576171875,
          0.0860595703125,
...

3/ Separately, in Insomnia, I query the collection’s objects using graphql and the _additional: vector field is blank.

{
	Get {
		Question {
			category
			question
			answer
			_additional {
				distance
				vector
				id
			}
		}
	}
}

response:

{
	"data": {
		"Get": {
			"Question": [
				{
					"_additional": {
						"distance": null,
						"id": "0119e108-5461-48c0-8d28-b8606cd57a83",
						"vector": [] <-------shouldn't this be the same values
					},
					"answer": "the atmosphere",
					"category": "SCIENCE",
					"question": "Changes in the tropospheric layer of this are what gives us weather"
				},

Notice the UUIDs are the same, so what am I missing?

Server Setup Information

  • Weaviate Server Version: 1.26.4
  • Deployment Method: docker
  • Multi Node? Number of Running Nodes: 1
  • Client Language and Version: typescript v3
  • Multitenancy: no

Separately, using this setup notation, is the vectorization done on all the fields?

Hi,

we have a functionality called named vectors: Multiple vectors | Weaviate

The TS client creates a named vector called “default” if you just choose a single vectorizer and if you fetch an object it hides that from you.

However in GQL queries you need to put that name in and the following shuld work

vectors{default}

PS:
The code is very hard to read if it is unformated, you can use “```” to start and end a code environment

2 Likes

Great advice and much appreciated. This needs to be documented better in the docs. I find no reference to vector default when I search in the named vectors section.

I cleaned up the formatting.

All the best, V.

I’ll let the docs team know!