Find

Article
· Jun 14, 2023 2m read

LangChain Ghost in the PDF

Posing a question to consider during the current Grand Prix competition.

I wanted to share an observation about using PDFs with LangChain.

When loading the text out of a PDF, I noticed there was an artifact of gaps within some of the words extracted.

For example (highlighted in red)

Adapti ve Analytics is an optional e xtension that pro vides a b usiness-oriented, virtual data model layer\nbetween InterSystems IRIS and popular Business Intelligence (BI) and Artificial Intelligence (AI) client tools. It includes\nan intuiti ve user interf ace for de veloping a data model in the form of virtual cubes  where data can be or ganized, calculated\nmeasures consistently defined, and data fields clearly named. By ha ving a centralized common data model, enterprises\nsolve the problem of dif fering definitions and calculations to pro vide their end users with one consistent vie w of b usiness\nmetrics and data characterization.

It was concerning this would affect:
1) The quality of document search for related content
2) The ability of OpenAI model to generate answers

What might be needed to stitch these words back together to improve things?

Could this use a word dictionary?

What would be the risk of linking two seperate words together.

Pushing ahead the unanticipated outcome was:

  • It didn't make a difference to either the document search or the ability to generate answers.

I suspect this is down to the way that OpenAI encoding and tokenizing operate.
The number of tokens is always higher than the number of words.
So tokens are already like "partial" words where tokens follow one another.
Thus the spaces in the middle of words didn't affect the answer.

Please share your experiences of Ghosts / Curious effects when using LangChain with IRIS.

Discussion (0)2
Log in or sign up to continue
Article
· Jun 13, 2023 2m read

OEX mapping #2

Technology Strategy

When I started this project I had set myself limits:
Though there is a wide range of almost ready-to-use modules in various languages
and though IRIS has excellent facilities and interfaces to make use of them
I decided to solve the challenge "totally internal" just with embedded Python, SQL, ObjectScript
Neither Java, nor Nodes, nor Angular, PEX, ... you name it.
The combination of embedded Python and SQL is preferred. ObjectScript is just my last chance.

I was especially impressed how easy reading an HTTPS page with Python was.
On the other hand, I left Unit Test and Global Merge and Object Property Setter in COS 

Add on after 1st release

The fact that the initial load took about 50 min was rather shocking to have 730 records in the end.
So kind of a QUICK preload was added. In practical work only the first page and eventually during a contest
the 2nd page of the directory holds new entries. The rest is almost static, not to say frozen.

Loading a page 1 and 2  is mostly sufficient to get all new packages
Then loading DETAILS for the few newbies is not worth mentioning.

Collecting results with SQl is an easy exercise but pivoting a cube is a bit more comfortable
So I added today classic IRIS Analytics to my package.
It's enabled in Namespace USER and is named OEX  similar to the first Pivot to start with

After starting the container the Unit Test leaves a test set of page 1 with ~30 records
Which is also the initial content of the Cube.

-

If you decide to run a completely fresh load it is up to you to rebuild the cube in Analytics Architect.

While using the QUICK variant the final step is a rebuild of the cube and you get this result.

So whether you intend to use SQL or Analytics is your decision.

I count on your votes in the contest
 

Discussion (0)1
Log in or sign up to continue
Question
· Jun 12, 2023

Folks, did Anyone performed DB or Backend Automation on IRIS Dataplatform?

 DB or Backend Automation on IRIS Dataplatform performed?

3 Comments
Discussion (3)1
Log in or sign up to continue
Question
· Jun 12, 2023

Performed API Automation on IRIS Dataplatform?

API performed API Automation on IRIS Dataplatform?

4 Comments
Discussion (4)1
Log in or sign up to continue
Article
· Jun 6, 2023 4m read

コンテナ版 WebGateway の使用方法

これは InterSystems FAQ サイトの記事です。
 

こちらでは、InterSystems Container Registry(ICR) より入手可能なDockerコンテナイメージを使用する方法をご案内します。

WRCDirectのダウンロードサイト より入手可能なイメージを使用する場合も同じようにできます。
 その際、Name:Web でフィルタリングしていただくと、Web Gateway の Docker イメージが見つけやすくなります。
※インターシステムズが提供する webgateway コンテナイメージには、Web ゲートウェイと Apache Web サーバの両方が含まれています。


【手順】

1. ブラウザより https://containers.intersystems.com/ にアクセスし、インターシステムズWRC認証情報でログインします。

2. Dockerログイントークンかログインコマンドを取得します。


3. 取得した認証情報を使い、Dockerインターフェース(PowerShellウインドウやLinuxコマンドラインなど)でICRへの認証を行います。
    以下の例のように、表示されるDocker ログインコマンドをコピー、ペーストすることで認証できます。

docker login -u="provided_username" -p="provided_password" containers.intersystems.com


4. 利用可能なコンテナイメージを確認します。

 ICRウェブポータル にWRCアカウントでログインし、
  InterSystems IRIS Product Family > webgateway > バージョン(例:2023.1.0.229.0)
 をクリックすると、以下のような pull コマンドを確認できます。
 ※開発者コミュニティで作成されたアカウントの場合は、Communityエディションのみダウンロードすることが可能です。

webgateway2023.1.0.229.0

Linux/amd64: docker pull containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0

Linux/arm64: docker pull containers.intersystems.com/intersystems/webgateway-arm64:2023.1.0.229.0

※キットから直接の場合

docker load -i webgateway-2023.1.0.229.0-docker.tar.gz


5. 次のようなイメージができていることを確認します。

# docker images
REPOSITORY                                            TAG                    IMAGE ID       CREATED         SIZE
containers.intersystems.com/intersystems/webgateway   2023.1.0.229.0         1a690ab8d70c   5 days ago      300MB


6. CSP.ini および CSP.conf ファイルを用意します。

 ※既存の構成を失うことなくコンテナをアップグレードできる 永続的な %SYS 機能 で実行します(オプション)
 ※今回は、Web ゲートウェイの構成が格納されているコンテナ内に /dur と呼ばれる永続的なデータディレクトリを作成します。
  ホストOSは /data/dur 以下に上記構成ファイルを用意します。
 ※ホストディレクトリ所有者は変更をしておく。  #sudo chown -R 51773:51773 /data/dur

サンプルの CSP.conf は以下のようになります。

# CSP config file

CSPModulePath "/opt/webgateway/bin/"
CSPConfigPath "/opt/webgateway/bin/"

<Location "/csp/bin/Systems/">
    SetHandler csp-handler-sa
</Location>
<Location "/csp/bin/RunTime/">
    SetHandler csp-handler-sa
</Location>

<Directory "/opt/webgateway/bin/">
    AllowOverride None
    Options None
    Require all granted
    <FilesMatch "\.(log|ini|pid|exe)$">
         Require all denied
    </FilesMatch>
</Directory>
<Location /csp>
  CSP On
  SetHandler csp-handler-sa
</Location>


7. webgateway コンテナを作成します。
 ※ホストのポート:8080 ににコンテナのポート:80 を割り当てます。

# docker run -d --name wg11 --publish 8080:80 --volume /data/dur:/dur --env ISC_DATA_DIRECTORY=/dur --env ISC_CSP_INI_FILE=/dur/CSP.ini --env ISC_CSP_CONF_FILE=/dur/CSP.conf containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0

※Docker for Windows の場合

docker run -d --name wg11 --publish 8080:80 --volume C:/data/dur:/dur --env ISC_DATA_DIRECTORY=/dur --env ISC_CSP_INI_FILE=/dur/CSP.ini --env ISC_CSP_CONF_FILE=/dur/CSP.conf containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0


8. Webゲートウェイに接続します。
 http://localhost:8080/csp/bin/Systems/Module.cxw
 接続に成功すると、以下のような画面が表示されます。


9. サーバアクセス(Server Access)の設定で、IRISサーバの情報を設定すると、管理ポータルには以下のURLでアクセスできます。
 http://localhost:8080/csp/sys/UtilHome.csp 

詳細は以下のドキュメントをご覧ください。

InterSystems Web ゲートウェイ・コンテナの使用法

 

enlightened【ご参考】
Apache Webサーバ(プライベートWebサーバ: PWS)インストレーションの廃止

Discussion (0)0
Log in or sign up to continue