|
| 1 | +--- |
| 2 | +icon: eccenca/application-ai-suggestion |
| 3 | +subtitle: LLM and MCP-tools based chat |
| 4 | +status: new |
| 5 | +tags: |
| 6 | + - Reference |
| 7 | +--- |
| 8 | +# Companion |
| 9 | + |
| 10 | +The Companion view enables you to interact with your data, graphs, vocabularies, resources and queries in a chat-like way. |
| 11 | + |
| 12 | +## Configuration |
| 13 | + |
| 14 | +<!-- TODO: add details --> |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +{ class="bordered" width="40%" } |
| 19 | + |
| 20 | +You can open the _Chat with Companion_ from any explore module via the :eccenca-application-ai-suggestion: Companion button the top right of the application header, next to the :eccenca-application-useraccount: user menu. |
| 21 | + |
| 22 | +{ class="bordered" width="60%" } |
| 23 | + |
| 24 | +In the companion sidebar, use: |
| 25 | + |
| 26 | +- :eccenca-toggler-maximize: to increase the size of the sidebar |
| 27 | +- :eccenca-toggler-minimize: to decrease the size of the sidebar |
| 28 | +- :eccenca-item-add-artefact: to start a new conversation |
| 29 | +- the dropdown menu to select or search for a conversation |
| 30 | +- :eccenca-item-upload: to add documents as context to the chat (supported formats include `pdf`, `txt` and `md`) |
| 31 | +- :eccenca-item-wrench: to configure the tools that the LLM can use to answer. |
| 32 | +- :eccenca-item-wrench: to use your microphone to dictate your questions |
| 33 | +- :material-send-variant-outline: to submit your question |
| 34 | + |
| 35 | +To maximise the relevance and accuracy of the generated answer, your question is automatically enriched based on the context of the current view (e.g. the query text, the graph and the resource IRI). |
| 36 | + |
| 37 | +### Tool selection |
| 38 | + |
| 39 | +{ class="bordered" width="40%" } |
| 40 | + |
| 41 | +The companion chat uses various tools to interact with Corporate Memory. |
| 42 | +These tools are used autonomously by the configured LLM model to gather the relevant context needed to generate the best answer. |
| 43 | +If your use case or question requires you to limit the available tools (e.g. if you only want to use queries from the query catalogue and not generate any), you can configure the tools the model can use via the drop-down widget. |
| 44 | + |
| 45 | +- Query Catalog related |
| 46 | + |
| 47 | + `query_list` |
| 48 | + : Query Catalog: Lists all existing SPARQL queries on this corporate memory instance. |
| 49 | + |
| 50 | + `query_details` |
| 51 | + : Query Catalog: Retrieve all information about a certain query in the query catalog |
| 52 | + resource_get Retrieves the Concise Bounded Description (CBD) of a resource from the knowledge graph and returns it as JSON-LD. |
| 53 | + |
| 54 | + `query_execute_saved` |
| 55 | + : Query Catalog: Executes a saved SPARQL query on this corporate memory instance. The query is identified by it's IRI. |
| 56 | + |
| 57 | +- Query related: |
| 58 | + |
| 59 | + `query_execute_jsonExecutes` |
| 60 | + : a `SPARQL SELECT` query on this corporate memory instance. The query is provided as a string. |
| 61 | + |
| 62 | +- Introspection related: |
| 63 | + |
| 64 | + `graph_tree` |
| 65 | + : Retrieves a tree of all the direct and transitive `owl:imports` for a given graph. |
| 66 | + |
| 67 | + `graph_class_usage` |
| 68 | + : Shows how classes are connected in a particular graph to each other by different properties. |
| 69 | + |
| 70 | + `graph_list` |
| 71 | + : Lists all existing RDF graphs on this corporate memory instance. |
| 72 | + |
| 73 | + `graph_properties_list` |
| 74 | + : Lists all used RDF properties used in this graph. |
| 75 | + |
| 76 | + `graph_classes_list` |
| 77 | + : Lists all used `owl:Class` etc. used in this graph. |
| 78 | + |
| 79 | + `vocabularies_property_list` |
| 80 | + : All Properties defined in this knowledge graph by installed vocabularies. While all properties are returned, they can easy be grouped by either their explicit association with an ontology in the isDefinedBy (`rdfs:isDefinedBy`) field, or by the sourceGraph field, which contains the names of the graphs from which the type statements were loaded from. |
| 81 | + |
| 82 | + `vocabularies_class_list` |
| 83 | + : All Classes defined in this knowledge graph by installed vocabularies. While all classes are returned, they can easy be grouped by either their explicit association with an ontology in the isDefinedBy (`rdfs:isDefinedBy`) field, or by the sourceGraph field, which contains the names of the graphs from which the type statements were loaded from. |
| 84 | + |
| 85 | +- Resource related |
| 86 | + |
| 87 | + `resource_search` |
| 88 | + : Performs a lucene syntax full text search of labels and descriptions for 'searchTerm' and retrieve list of best matches. The context graph will restrict the search to it includes, or search the full graph. Pattern allows to define a `SPARQL WHERE` clause snippet, which defaults to `{GRAPH ?contextGraph {?resource ?p ?o}}`. Search will always be on the `?resource`, so adjust the pattern, if needed. |
| 89 | + |
| 90 | +### Interactive answers |
| 91 | + |
| 92 | +Your answer may include elements that allow rich interaction with specific Corporate Memory views and modules: |
| 93 | + |
| 94 | +<!-- TODO: add details --> |
| 95 | + |
| 96 | +- Queries |
| 97 | +- BKE Exploration |
| 98 | +- Resource |
0 commit comments