Grence

Conversation Examples

Example conversations showing how to explore biomedical knowledge graphs with ARK CLI.

These examples demonstrate the kinds of questions you can ask and how the AI agent traverses the knowledge graph to find answers. Each example shows the user query and explains what the agent does behind the scenes.

These examples use PrimeKG. The exact results depend on the knowledge graph you're querying. Different graphs may represent the same biomedical concepts with different levels of detail.

Simple Entity Lookup

Finding a gene's neighbors

Query:

What are the neighbors of the A2M gene/protein?

What the agent does:

  1. Calls findNodesByName with "A2M" to locate the gene node
  2. Calls getNeighborsByNodeId on the matched node to retrieve connected entities
  3. Calls getNodeDetails on a subset of neighbors to get their names and types
  4. Summarizes the results, listing diseases, other genes, biological processes, and pathways connected to A2M

Drug-Disease Relationships

Finding treatments for a disease

Query:

What drugs are used to treat Type 2 Diabetes?

What the agent does:

  1. Calls findNodesByName with "Type 2 Diabetes" to find the disease node
  2. Calls getNeighborsByNodeId with an edge type filter for drug-disease relationships
  3. Calls getNodeDetails on the drug nodes to retrieve their full information
  4. Returns a list of drugs with their properties and relationship types

Understanding drug mechanisms

Query:

How does metformin work at the molecular level?

What the agent does:

  1. Searches for the metformin drug node
  2. Traverses to gene/protein targets via drug-gene edges
  3. Explores those proteins' involvement in biological processes and pathways
  4. Synthesizes a multi-hop explanation: drug → protein targets → pathways → biological effects

Multi-Hop Reasoning

Finding a connecting gene

Query:

Is there a gene that connects cutaneous T-cell lymphoma and mRNA binding?

What the agent does:

  1. Calls findNodesByName for both "cutaneous T-cell lymphoma" and "mRNA binding"
  2. Uses searchInSurroundings on the disease node with query: "mRNA binding" to search within 2 hops
  3. Alternatively, calls getNeighborsByNodeId on both entities and looks for shared neighbors
  4. Identifies genes that appear in both neighborhoods, establishing the connection

Exploring shared genetic factors

Query:

Which diseases share genetic risk factors with both Alzheimer's and Parkinson's?

What the agent does:

  1. Finds both disease nodes
  2. Gets gene neighbors for each disease
  3. Identifies overlapping genes
  4. For each shared gene, finds other connected diseases
  5. Returns diseases that share genetic connections with both conditions

Using searchInSurroundings

Query:

Are there any kinase-related proteins in the neighborhood of BRCA1?

What the agent does:

  1. Finds the BRCA1 node
  2. Calls searchInSurroundings with nodeId for BRCA1, query: "kinase", and nodeType: "gene/protein"
  3. The tool searches within 1-2 hops, matching node names and properties against the query
  4. Returns matching neighbors ranked by relevance, with edge information showing how they connect to BRCA1

Tips for Effective Queries

  • Be specific with entity names. "BRCA1" works better than "breast cancer gene" for initial lookups.
  • Ask the agent to explain its reasoning. This helps you understand the traversal path and verify the results.
  • Use follow-up questions to drill deeper. Rather than asking overly complex single questions, build up context across turns.
  • Ask about available relationship types. "What types of edges connect to this node?" helps you understand the graph structure.
  • Request node properties. Properties often contain additional metadata like synonyms, external database IDs, and descriptions.

On this page