The CosmosAIGraph (caig) solution is deployed as two microservices:
Name | Functionality |
---|---|
web | Web microservice, user-facing, HTML-based UI and RESTful API |
graph | Graph microservice with an in-memory Apache Jena graph |
These are located in the web_app, and graph_app folders of this repository.
They are also packaged as Docker containers named as caig_web, and caig_graph, respectively.
- Python3 is used exclusively in the CosmosAIGraph solution
- FastAPI is used exclusively as the framework for the web and http services
- Azure Cosmos DB for NoSQL is used as the persistent datastore for source data and session history as well as a vector database
- See https://learn.microsoft.com/en-us/azure/cosmos-db/
- Your domain data, with embeddings, are stored here
- AI sessions - prompts/completions history and feedback - are persisted here as well
- This Cosmos DB data can optionally be mirrored to OneLake in Microsoft Fabric for analytics, semantic cache and other capabilities
- Azure OpenAI is used for AI models
- semantic-kernel is used for AI and LLM orchestration
- Apache Jena is used as the high-performance in-memory graph
- SPARQL 1.1 is the graph query language
- Web Ontology Language (OWL) is the graph schema/ontology definition language
Open a PowerShell Terminal, navigate to the desired parent directory and execute the following git clone command. This will copy the contents of the public GitHub repository to your workstation.
If you don't have git installed on your system, please see the Developer Workstation Setup page.
> git clone https://github.com/AzureCosmosDB/CosmosAIGraph.git
> cd CosmosAIGraph
> Get-Location
The output value from the Get-Location will be a fully-qualified directory path on your workstation. Please set the CAIG_HOME environment variable to this directory path value.
echo 'setting CAIG_HOME'
[Environment]::SetEnvironmentVariable("CAIG_HOME", "...your value from Get-Location ...", "User")
You will need to restart your Terminal for the above command to take effect.
You'll see in a section below that this CosmosAIGraph reference application uses several environment variables, and they all begin with CAIG_.
- See Local Execution
- See Explore the FastAPI Framework and Endpoint Documentation
- See Understanding the Code
- See Screen Shots
It is recommended that CosmosAIGraph Proof-of-Concept (POC) team has the following skill sets:
-
A data analyst who is familiar with your input graph data
-
A data engineer who can wrangle/transform the raw data into JSON documents for Cosmos DB
-
A Python developer with UI skills
-
A Java developer with graph (SPARQL/TTL) skills
-
See the FAQ Page to clarify your understanding of the CosmosAIGraph solution.