I am trying to use generative modules with cross-referenced documents and am having trouble figuring out how to properly reference the properties of the cross-reference to include them in the generate task.
The use case boils down to:
- I have chunked documents; schema is basically a one to many relationship between ParentDoc and DocChunks
- I need to grab the
limit: 1
matching DocChunk of anearText
query - I need to use the groupedResult generator with all of the DocChunks that relate to the ParentDoc of my matching DocChunk, in effect the entire text of the ParentDoc - all DocChunks put together
Using the online demo (https://edu-demo.weaviate.network/v1) a basic query that I am trying to run could be modeled as follows:
{
Get {
Article(
limit: 1
where: {operator: Equal, path: ["hasAuthors", "Author", "name"], valueString: "Benjamin Lee"}
) {
_additional {
id
certainty
generate(
groupedResult: {task: """reply with the exact input i provided""", properties: ["name"]}
) {
error
groupedResult
}
}
title
url
summary
hasAuthors {
... on Author {
name
}
}
}
}
}
Where I attempt to pass the name
property of the cross-referenced Author
class into the generator. I have tried a variety of syntax but have not been successful. Is this a supported feature? If so, can you please help me sort out my query?