Is it possible for semantic algorithms running upon ComposeDB?

Hi Ceramic Team,

We are developing a content-based social network, and it would be semantic-heavy. We would like to know if it is possible to run semantic algorithms purely on Compose DB without retrieving data back to our centralized database.

As your documents say, we need to store indices in our database to query in the Ceramic graph database. Then can we query data by values? For example, can we calculate two content nodes’ distance in the graph? Or can we add weights to different nodes/edges?

Thank you,

My initial guess is that this is likely not possible right now. Would like to know more about the problem you are trying to solve though.

Could you elaborate a bit about what you mean when you say “semantic algorithm”?

Hi @joel,

Thank you for your reply. I’ll give some simple examples.

  1. We may want to link hashtags labelled on the user-generated content that are synonymous. To be specific, when a user flags a new tag that does not exist in the database, we want to check if there are other tags that have the same meaning as the new one. If there is any, we want to link the new tag to all of its synonymous. Do we need to retrieve all tags in the data model to do the semantic computation?

  2. For example, we want to check how similar two users’ interest areas are. Can we query all content they created/saved/highlighted(the content and relationships are saved in ComposeDB), and see how many overlapping tags are labelled on those content? I think in graph databases like Neo4j, this kind of query is intuitive and simple.

Thank you,

When you index a data model, all the documents belonging to that model go into a local postgres database, with the document contents going into a JSONB field. So even if ComposeDB doesn’t expose a GraphQL query API for exactly the type of query you need, you could connect directly to the postgres database and use the JSONB content column for whatever queries you want.

1 Like