Home Articles Books Search About
日本語
Building a RAG-based Chat Using Azure OpenAI, LlamaIndex, and Gradio

Building a RAG-based Chat Using Azure OpenAI, LlamaIndex, and Gradio

Overview I tried building a RAG-based chat using Azure OpenAI, LlamaIndex, and Gradio, so here are my notes. Azure OpenAI Create an Azure OpenAI resource. Then, click “Endpoint: Click here to view endpoint” to note down the endpoint and key. Then, navigate to the Azure OpenAI Service. Go to “Model catalog” and deploy “gpt-4o” and “text-embedding-3-small”. The result is displayed as follows. Downloading the Text This time, we target “The Tale of Genji” published on Aozora Bunko (a free digital library of Japanese literature). ...

RELAX NG and Schematron

RELAX NG and Schematron

Overview When creating TEI/XML with oXygen XML Editor, the following template is generated. <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>Title</title> </titleStmt> <publicationStmt> <p>Publication Information</p> </publicationStmt> <sourceDesc> <p>Information about the source</p> </sourceDesc> </fileDesc> </teiHeader> <text> <body> <p>Some text here.</p> </body> </text> </TEI> I was curious about the following difference, so I am sharing the results of querying GPT-4. <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> Answer The difference between the 2nd and 3rd lines is the namespace specified in the schematypens attribute. Details are explained below. ...

LlamaIndex+GPT4+gradio

LlamaIndex+GPT4+gradio

Overview I had the opportunity to use LlamaIndex, GPT4, and gradio together, so this is a memo of the process. Since the text used was small in size, the results are accordingly modest, but I prototyped a chatbot for Shibusawa Eiichi. Background I referred to the following article. https://qiita.com/DeepTama/items/1a44ddf6325c2b2cd030 Based on the above, I made modifications to work with libraries as of April 20, 2024. The notebook is published at the following location. ...

Checking Which Users Belong to a Specific Group on a Linux System

Checking Which Users Belong to a Specific Group on a Linux System

Overview ! This is an answer from ChatGPT 4. There are several ways to check which users belong to a specific group on a Linux system. Here, we explain how to list users belonging to specific groups (in this case, “group1” and “group2”) using the command line. Method 1: Check the /etc/group File On Linux, the /etc/group file stores information about all groups on the system and the users belonging to them. By checking this file, you can identify users in a specific group. ...