Hi!
I tried to leverage the full RAG-functionality of weaviate-cloud. I could not get any results with the JS-SDK, using my anthropic API-key in the respective header. Instead I received the following Error:
WeaviateQueryError: Query call with protocol gRPC failed with message: /weaviate.v1.Weaviate/Search UNKNOWN: explorer: get class: concurrentTargetVectorSearch): explorer: get class: extend: extend generate: client not found, empty provider
at <anonymous> (/xxx/node_modules/.pnpm/weaviate-client@3.4.0_encoding@0.1.13/node_modules/weaviate-client/dist/node/esm/grpc/searcher.js:46:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Apart from that I could easily perform embeddings and hybrid search, so RAG seems the culprit here. I tried both, the REST and the grpc Endpoint, because the documentation does not clarify which one to use. Using the grpc endpoint resulted in this error:
WeaviateStartUpError: Weaviate startup failed with message: Weaviate failed to startup with message: The request to Weaviate failed with status code: 415 and message:
at <anonymous> (/xxx/node_modules/.pnpm/weaviate-client@3.4.0_encoding@0.1.13/node_modules/weaviate-client/dist/node/esm/connection/helpers.js:52:11)
Can somebody tell me whatโs going on here?
Thank you!
Hey there, could you share snippets of your connection function (with headers included) and the code that produces these errors? What Weaviate and JS client version are you using?
Hi,
client version: 3.4.0
,
weaviate cloud database version(sandbox): 1.29.0
,
I connect with this call:
this.client = await weaviate.connectToWeaviateCloud(this.url, {
authCredentials: 'XYZ',
headers: {
'X-Anthropic-Api-Key':
'XXX',
},
});
the throwing code looks like this:
const results = await this.client.collections
.get('collection')
.withTenant('tenantX');.generate.nearText(
'query',
{
groupedTask: 'xxx',
},
{
limit: 10,
},
);
Thank you for looking into this!
From the error you have, it looks like you might have misconfigured your collection.
Did you include the generative anthropic module or a vectorizer
module??
The snippet you shared (minus the โ;โ before generate
) worked for me with this collection configuration.
await client.collections.create({
name: 'Collection',
// Define your vectorizer and Anthropic generative model
vectorizers: weaviate.configure.vectorizer.text2VecOpenAI({
sourceProperties: ['title','text']
}),
generative: weaviate.configure.generative.anthropic(),
multiTenancy: weaviate.configure.multiTenancy({enabled: true, autoTenantCreation: true})
});
Let me know if any of these fix the issue for you.
Sorry for the ;
! Thatโs just a typo originating in me trying to generalise my code for this thread.
The vectorizers
-property was configured as suggested by you, but I actually missed that I have to configure my collection to use a generative model too. My bad, thank you very much for bringing that up.
Maybe a more prominent hint on collection-configuration in the Rag Documentation and a more verbose ErrorMessage would improve the DX here!
1 Like
I figured, i only pointed it (;
) out incase that was an error waiting to happen 
Happy it worked, thanks for the feedback on the docs, we do have a drop down pointing users to a page that details the required config for RAG, do you think we could do more to make it more obvious?
Maybe just pin a minimal collection config on top with all properties that are required for RAG.
But an error message stating that the collection misses a generative AI model would be most helpful.
Thank you 
1 Like