![]() |
VOOZH | about |
dotnet add package Oraculum --version 1.3.5
NuGet\Install-Package Oraculum -Version 1.3.5
<PackageReference Include="Oraculum" Version="1.3.5" />
<PackageVersion Include="Oraculum" Version="1.3.5" />Directory.Packages.props
<PackageReference Include="Oraculum" />Project file
paket add Oraculum --version 1.3.5
#r "nuget: Oraculum, 1.3.5"
#:package Oraculum@1.3.5
#addin nuget:?package=Oraculum&version=1.3.5Install as a Cake Addin
#tool nuget:?package=Oraculum&version=1.3.5Install as a Cake Tool
New: Checkout OraclumLocalBox for a self-contained sandbox for trying the system.
New: OraculumApi allows to easily embed Sibylla/Oraculum systems using swagger based API.
The aim of this project is to create a lightweight and easy to deploy AI assistant dedicated to answer to questions using a knowledge base expressed in facts. Relying on a vector database (Weaviate) the knowledge is "semantically" indexed using embeddings so that information expressed in a language can be queried using different languages.
Facts are small chunks of information with metadata (i.e. category, or a citation string) and are selected for engineering a prompt by the chat assistant named Sibylla for answering question about topics in the knowledge base. It is possible to have multiple Sibyllae accessing the Oraculum knowledge base whose behavior is affected by the specific prompt used to configure each of them.
Knowledge is added to the system using a set of PowerShell cmdlets that can be used to spider and preprocess information from different sources (i.e. web pages, documents, etc.) and then add them to the knowledge base. To monitor the evolution of the knowledge and the behavior of the Sibyllae the project also includes a .NET Interactive notebook that can be used to inspect the knowledge base and instantiate multiple Sibyllae for testing.
When I started developing this project the main reasons were:
The project it's still in his infancy but it can be used in production if you want to quickly start with AI in your systems.
Fact class now is annotated to allow Weaviate.NET to use OpenAI embeddings v3 (large model).
The upgrade procedure can be explicit or if you connect to Weaviate. The upgrade procedure can be slow since all the data is exported and
reindexed. It is recommended to backup the database before upgrading.UserName option in Oraculum configuration to indicate the default owner id. Fixed minor bugs.Sibylla and OraculumFindRelevantFacts algorithm in Oraculum to avoid adding unrelated facts to the prompt. Now distance is normalized and used to decide which facts are relevant under the assumption that the retrieved facts are more than those relevant.Demo.json file in SibyllaSandbox project)UpdateFact to support fact update (in particular from CLI)ILogger supportGet-Facts | ConvertTo-Json > backup.json before upgrading.Configuration property in Sibylla classTitle property to SibyllaConfIn the jungle of models, companies, and tools of nowadays AI I decided for a set of tools, the overall system can be reasonably adapted to other tools but if you want to use it you need:
This project relies on WeaviateNET to access and use Weaviate vector DB.
You can tweak the docker-compose.yml file included in the project to deploy a self-contained sandbox for trying.
The core project is very small (less than 1k loc), and it is packaged as .NET library so that you can easily embed it inside any .NET project. A Web API is also on the roadmap so that also Web-based integration scenarios will be supported.
An important aspect considered in the design is CLI support: we firmly believe that knowledge management is essential and command line is a precious tool when you need to get knowledge from most disparate sources. For this reason we created a set of powershell cmdlets that you can run on any platform for inspecting the fact database and edit it using your favorite set of tools for spidering and preprocessing.
The easiest way is to allocate a Weaviate instance on Weaviate or to start a docker image if you have on-prem infrastructure. You can then install PowerShell core (7.3.0 or later) and then simply use the Oraculum powershell module from PowerShell gallery:
Install-Module Oraculum
During the first run you need to create the Oraculum configuration file (if you use an unauthenticated version of Weaviate you can omit the ApiKey and also the OrgID in the OpenAI API is not rally used):
$c = New-Object OraculumCLI.OraculumConfiguration
$c.OpenAIApiKey = 'Your key'
$c.OpenAIOrgId = 'Your org id'
$c.WeaviateApiKey = 'Your weaviate api key'
$c.WeaviateEndpoint = 'http://localhost:8080/v1'
ConvertTo-Json $c > myoraculum.conf
Now you can initialize the schema and start loading your knowledge:
Connect-Oraculum -ConfigFile myoraculum.conf
Reset-Schema
Add-Fact -Category FAQ -Title "My first FAQ" -Content "Content of my FAQ"
...
Get-Facts | Out-GridView
The Get-Facts cmdlet allows you to inspect the Fact class, you can use filters to select only facts with some meta-attributes.
You can configure an instance of Sibylla in a similar way:
$c = New-SibyllaConf -SystemPrompt "You are an operator who answers questions from users of the X system. You will only respond to questions regarding missions on behalf of the Organization. For all other questions, you will reply with 'I am authorized to respond only to X-related matters.' To answer, you will use only true facts and information related to the facts in XML format that will follow in place of your knowledge. Facts with the 'faq' element address frequently asked questions, and facts with the 'reg' element pertain to regulation clauses. If you use information from an XML fact that has a 'cit' attribute, include the citation in parentheses in your response. Each question you receive will be from a user with an issue." -AssistantPrompt "Welcome to X support" -Model gpt-3.5-turbo -MaxTokens 256 -Temperature 0.1
ConvertTo-Json $c > mysibylla.conf
Now you can start a Sibylla session:
New-SibyllaSession -ConfigFile mysibylla.conf
Important: The prompt of a Sibylla is up to you but the system will inject relevant facts from the Weaviate DB in XML format so you should always mention this in your prompt.
This is the first public release of the project, the strategy by which Sibylla adds facts to the prompt is still in its infancy and it will be needed more research and testing to find a policy respectful of the prompt size that still retain the important domain knowledge.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Oraculum:
| Package | Downloads |
|---|---|
|
OraculumInteractive
Oraculum kernel for .NET interactive |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.5 | 349 | 2/22/2024 |
| 1.3.4 | 282 | 2/3/2024 |
| 1.3.3 | 294 | 1/13/2024 |
| 1.3.2 | 244 | 1/13/2024 |
| 1.3.1 | 290 | 12/28/2023 |
| 1.3.0 | 250 | 12/26/2023 |
| 1.2.0 | 315 | 12/10/2023 |
| 1.1.3 | 298 | 11/5/2023 |
| 1.1.2 | 253 | 10/29/2023 |
| 1.1.1 | 263 | 10/28/2023 |
| 1.1.0 | 251 | 10/22/2023 |
| 1.0.2 | 292 | 9/13/2023 |
| 1.0.1 | 265 | 9/5/2023 |
| 1.0.0 | 270 | 9/5/2023 |