The Instill Artifact component is a data component that allows users to access files and perform RAG-based search and retrieval through catalogs in the Instill Core platform.
It can carry out the following tasks:
To use Artifact Component, you will need to set up the OpenAI API key for self-hosted deployment of Instill Core.
You can do this by setting the OPENAI_API_KEY environment variable.
Please refer to configuring-the-embedding-feature
p.s. In Instill Cloud case, you do not need to set up the OpenAI API key.
Release Stage
Alpha
Configuration
The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
Supported Tasks
Upload File
Upload and process the files into chunks into Catalog.
The creation time of the chunk in ISO 8601 format.
End Position
end-position
integer
The end position of the chunk in the file.
File UID
original-file-uid
string
The unique identifier of the file.
Retrievable
retrievable
boolean
The retrievable status of the chunk.
Start Position
start-position
integer
The start position of the chunk in the file.
Token Count
token-count
integer
The token count of the chunk.
Get File in Markdown
get the file content in markdown format.
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_GET_FILE_IN_MARKDOWN
Catalog ID (required)
catalog-id
string
Catalog ID that you input to search files in the Catalog.
Namespace (required)
namespace
string
Fill in your namespace, you can get namespace through the tab of switching namespace.
File UID (required)
file-uid
string
The unique identifier of the file.
Output
Field ID
Type
Description
File UID
original-file-uid
string
The unique identifier of the file.
Content
content
string
The content of the file in markdown format.
Create Time
create-time
string
The creation time of the source file in ISO 8601 format.
Update Time
update-time
string
The update time of the source file in ISO 8601 format.
Match File Status
Check if the specified file's processing status is done.
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_MATCH_FILE_STATUS
Catalog ID (required)
catalog-id
string
Catalog ID that you input to check files' processing status in the Catalog.
Namespace (required)
namespace
string
Fill in your namespace, you can get namespace through the tab of switching namespace.
File UID (required)
file-uid
string
The unique identifier of the file.
Output
Field ID
Type
Description
Status
succeeded
boolean
The status of the file processing, if succeeded, return true.
Retrieve
search the chunks in the catalog.
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_RETRIEVE
Catalog ID (required)
catalog-id
string
Catalog ID that you input to search files in the Catalog.
Namespace (required)
namespace
string
Fill in your namespace, you can get namespace through the tab of switching namespace.
Text Prompt (required)
text-prompt
string
The prompt string to search the chunks.
Top K
top-k
integer
The number of top chunks to return. The range is from 1~20, and default is 5.
File UID
file-uid
string
Optional filter by file.
File Media Type
file-media-type
string
The media type to filter, empty for all. Enum values
document
image
audio
video
Content Type
content-type
string
The content type to filter, empty for all. Enum values
chunk
summary
augmented
Filename
filename
string
File name to filter, empty for all. This field is deprecated and the file UID should be used instead. The filename isn't unique by catalog and therefore the filter might produce unexpected results.
version: v1beta
component:
artifact-0:
type: instill-artifact
task: TASK_ASK
input:
catalog-id: ${variable.catalog_name}
namespace: ${variable.namespace}
question: ${variable.question}
top-k: 5
variable:
catalog_name:
title: catalog-name
description: The name of your catalog i.e. "instill-ai"
type: string
namespace:
title: namespace
description: The namespace of your catalog i.e. "instill-ai"
type: string
question:
title: question
description: The question to ask your catalog i.e. "What is Instill AI doing?", "What is Artifact?"
type: string
output:
answer:
title: answer
value: ${artifact-0.output.answer}