Summary
Convert X's comments to data that you can discuss with SQL and consult from an agent. The demonstration integrates Oracle AI Data Platform Workbench, OCI Language, Oracle Autonomous AI Database and Agent Factory.
The service, workspace and cluster are created, bookstores are established and connections are prepared. A Python notebook removes responses to an X post and gets his feeling scores with OCI Language.
The results move from panda to an Apache Spark Dataprame and are stored in a Delta table. The categories and field toxicity_score of the notebook are computed by rules about negative feeling score. have an indicative range.
Autonomous is then registered as an external catalogue and data are charged using MERGE by response identifier. The notebook is organized into a job with execution logs and an automatic program.
At the end, Agent Factory connects to the database to answer questions about comments in natural language. The responses are contrasted with SQL consultations to follow the path from extraction to concurrently consultation.
Start
Following the introduction, the integration of Oracle AI Data Platform Workbench with a previous project of Agent Factory was put forward. The tour links data production and notebooks execution with its storage at Autonomous and its consultation from an agent.
Master Catalog and Workbench components
The Master Catalog, internal and external sources, notebooks, workflows and compute of the Workbench are presented. The explanation puts these components in a dedicated work environment and goes through the documentation before developing the practice.
Retirement analysis case at X
The case takes an X release, removes his answers and uses OCI Language to get feeling scores. Those results will become tables and will then be available with SQL and from Agent Factory.
API Configure from X
The development account and the application of X used to gain access to publications are visited. The demonstration prepares the token and authentication options that the notebook will require to get back the responses from the example.
Commission and policies for access
The OCI console selects work share and checks permissions to gain access to the lab's services. That preparation precedes the creation of resources and calls to OCI Language.
Sense analysis with OCI Language
The OCI Language console allows you to explore text analysis and positive, negative and neutral feeling scores. The service that the notebook will use to evaluate the comments retrieved from X. will be presented
Preparation of Oracle Autonomous Database
SQL tools from Autonomous create the application user and assign permissions from the example. The wallet will also be prepared to provide connections with the components that will consume or load the results.
Creation of AIDP and Workspace
The instance of Oracle AI Data Platform is created in the select share and its workspace is defined. The demonstration checks the access policies and once the service has been supplied confirms authentication before entering the Workbench.
Creation of compute cluster
The cluster is created within the workspace and the activity window of the lab is set up. Following the provisioning are its connecting options, the associated notebooks and bookstores that will be installed to run the analysis.
Installation of bookstores at the cluster
A file of dependencies with the packages will be prepared and will be used by the notebook, including panda and requests. From the library section of the computer that file is select and its contents are put into the cluster.
OCI Credentials Setup
The OCI Access Configure is prepared and your file routes are adjusted within the workspace. The demonstration checks that the config and key reference are related to the uploaded archives for the lab's calls.
Creation of an analysis notebook
The analysis notebook is created, its bookstores are imported and associated with the cluster. The parameters that will be used by OCI customers and the flow functions are then set up before selecting the issue of X.
Selection of X's publication
The Touch of X is introduced and the publication will be chosen and its responses analysed. The notebook checks OCI's configuration and prepares functions to recover responses, analyze feeling and build output data architecture.
Performance of the feeling analysis
The analysis is run and the feeling scores are reviewed with text and user identifiers. The notebook applying guiding rules about negative feeling to compute its categories and toxicity_score; That field isn't an independent performance of service toxicity.
DataFrames Spark and tables Delta
The panda results are transformed into a DataFame from Apache Spark. A catalogue and an outline are created and a Delta table are prepared to save comments and their scores. The Master Catalog allows you to check the table and its columns and its permissions.
SQL Consultation on Results
The data are scanned with SQL queries: list of logs, distribution by category, mean score and comments with highest scores. These consultations have been followed up by an examination of information to be submitted to the agent.
Catalog with Autonomous Database
Autonomous is registered as an external catalogue and the connection is tested by selecting the instance and user. At the base a table with the structure of the results and an updated catalogue of the Workbench are prepared for its location.
Loading through MERGE and data validation
From the notebook a MERGE is performed in the Autonomous table using the response identifier as a reference. The table was then consulted to check that registration reached the base and became available to the following consumers.
Creation and execution of the workflow
A job will be created with the task of performing the notebook and select the cluster and a maximum time of execution. The manual executions allow you to follow your states and process messages, including writing results at Spark and Autonomous.
Automatic job Programming
The job is structured with a schedule and a time area. The demonstration expects the following execution and checks its appearance with manual attempts and checks that the process can be initiated automatically.
Connection from Agent Factory to Autonomous
Agent Factory creates a data source for Autonomous using the connection prepared for the example. The wallet is loaded, user data complete and access tested before using an agent template on the basis.
Agent for consultations in natural language
The receives template a question and distinguishes between a data search and a general conversation. The language model, table consultation and response using the base result are set up. The tour also shows the branch of conversation when intention doesn't require searching.
Test agent and validation with SQL
He wondered about best and worse-tipped comments and found the returned logs using SQL. The comparison checks that the responses are consistent with the loaded data and with the guiding categories computed on the notebook.
Integration and closure
The closure sums up the integration of the API from X, OCI Language, Spark, Autonomous and Agent Factory. The flow shows how to prepare and store information before interviewing them, and mentions other possible integrations as later work.