welcome aboard

Ships of Hagoth is a digital-first literary magazine featuring creative nonfiction and theoretical essays by members of the Church of Jesus Christ of Latter-day Saints. Where other LDS-centric publications often look inward at the LDS tradition, we seek literary works that look outward through the curious, charitable lens of faith.

To put this paper itself "in action", the accompanying GitHub repo would be:

@Service public class IngestionPipeline private final TokenTextSplitter splitter = new TokenTextSplitter(500, 100); // 500 tokens per chunk private final VectorStore vectorStore; private final EmbeddingClient embeddingClient; @Autowired public IngestionPipeline(VectorStore vectorStore, EmbeddingClient embeddingClient) this.vectorStore = vectorStore; this.embeddingClient = embeddingClient;

Below is a structured, actionable "paper" – more accurately, a – on the topic "Spring AI in Action: Leveraging PDF Data via GitHub Repositories."

@Service public class GitHubPdfFetcher private final GitHub github = new GitHubBuilder().withOAuthToken(System.getenv("GITHUB_TOKEN")).build(); public List<byte[]> fetchPdfsFromRepo(String repoName, String path) throws IOException GHRepository repo = github.getRepository(repoName); List<GHContent> pdfs = repo.getDirectoryContent(path).stream() .filter(c -> c.getName().endsWith(".pdf")) .toList(); return pdfs.stream().map(content -> try (InputStream is = content.read()) return is.readAllBytes(); catch (IOException e) throw new RuntimeException(e); ).collect(Collectors.toList());

spring-ai-pdf-github-demo/ ├── src/main/java/com/example/ │ ├── config/VectorStoreConfig.java │ ├── service/GitHubPdfFetcher.java │ ├── service/PdfDocumentService.java │ ├── pipeline/IngestionPipeline.java │ └── controller/ChatController.java ├── src/main/resources/application.yml ├── docker-compose.yml (for PGVector) ├── README.md └── sample-pdfs/ (for testing) spring: ai: openai: api-key: $OPENAI_API_KEY embedding: options: model: text-embedding-ada-002 vectorstore: pgvector: index-type: HNSW distance-type: COSINE_DISTANCE datasource: url: jdbc:postgresql://localhost:5432/vectordb github: token: $GITHUB_TOKEN 5. Best Practices & Troubleshooting | Challenge | Solution | |-----------|----------| | Large PDFs > 10MB | Use GitHub's blob API with range requests. | | Rate limiting (GitHub API) | Implement RetryTemplate with exponential backoff. | | PDFs with scanned images | Use TikaDocumentReader with OCR plugin (Tesseract). | | Token limit exceeded | Use TokenTextSplitter with overlap=100 tokens. | | Metadata tracking | Add Document metadata: put("source", pdfUrl) for provenance. | 6. Conclusion The combination of Spring AI (abstractions for LLM workflows), GitHub as a document source , and PDF parsing creates a powerful enterprise knowledge retrieval system. By following the ingestion and query patterns shown here, developers can build secure, context-aware AI applications that leverage existing documentation stored in GitHub repositories.

@Service public class PdfDocumentService public List<Document> parsePdfs(List<byte[]> pdfBytesList) return pdfBytesList.stream() .flatMap(bytes -> ByteArrayInputStream bais = new ByteArrayInputStream(bytes); TikaDocumentReader reader = new TikaDocumentReader(bais); return reader.get().stream(); // Returns List<Document> ) .collect(Collectors.toList());

@RestController public class ChatController private final ChatClient chatClient; private final VectorStore vectorStore; @GetMapping("/ask") public String askAboutGitHubPdfs(@RequestParam String question) // Retrieve relevant PDF chunks List<Document> relevantDocs = vectorStore.similaritySearch(question); // Create system prompt with context String context = relevantDocs.stream() .map(Document::getText) .collect(Collectors.joining("\n---\n")); return chatClient.call(new Prompt( List.of(new SystemMessage("Answer based only on: " + context), new UserMessage(question)) )).getResult().getOutput().getText();

This is an excellent topic, as it sits at the intersection of a popular framework (Spring AI), a specific resource format (PDF), and a vital developer platform (GitHub).

hagoth's updates

Whether you’re an interested writer or reader, subscribe below and we’ll keep you in the loop.

A CALL FOR

SUB
MISS
IONS

We are hoping—for “one must needs hope”—for creative nonfiction, theoretical essays, and craft essays that seek radical new ways to explore and express theological ideas; that are, like Hagoth, “exceedingly curious.”

We favor creative nonfiction that can trace its lineage back to Michel de Montaigne. Whether narrative, analytical, or devotional, these essays lean ruminative, conversational, meandering, impressionistic, and are reluctant to wax didactic. 

As for theoretical essays: we welcome work that playfully and charitably explores the wide world of arts & letters—especially works created from differing religious, non-religious, and even irreligious perspectives—through the peculiar lens of a Latter-day Saint.

We read and publish submissions as quickly as possible, and accept simultaneous submissions. 

Ai In Action Pdf Github //free\\ — Spring

To put this paper itself "in action", the accompanying GitHub repo would be:

@Service public class IngestionPipeline private final TokenTextSplitter splitter = new TokenTextSplitter(500, 100); // 500 tokens per chunk private final VectorStore vectorStore; private final EmbeddingClient embeddingClient; @Autowired public IngestionPipeline(VectorStore vectorStore, EmbeddingClient embeddingClient) this.vectorStore = vectorStore; this.embeddingClient = embeddingClient;

Below is a structured, actionable "paper" – more accurately, a – on the topic "Spring AI in Action: Leveraging PDF Data via GitHub Repositories." spring ai in action pdf github

@Service public class GitHubPdfFetcher private final GitHub github = new GitHubBuilder().withOAuthToken(System.getenv("GITHUB_TOKEN")).build(); public List<byte[]> fetchPdfsFromRepo(String repoName, String path) throws IOException GHRepository repo = github.getRepository(repoName); List<GHContent> pdfs = repo.getDirectoryContent(path).stream() .filter(c -> c.getName().endsWith(".pdf")) .toList(); return pdfs.stream().map(content -> try (InputStream is = content.read()) return is.readAllBytes(); catch (IOException e) throw new RuntimeException(e); ).collect(Collectors.toList());

spring-ai-pdf-github-demo/ ├── src/main/java/com/example/ │ ├── config/VectorStoreConfig.java │ ├── service/GitHubPdfFetcher.java │ ├── service/PdfDocumentService.java │ ├── pipeline/IngestionPipeline.java │ └── controller/ChatController.java ├── src/main/resources/application.yml ├── docker-compose.yml (for PGVector) ├── README.md └── sample-pdfs/ (for testing) spring: ai: openai: api-key: $OPENAI_API_KEY embedding: options: model: text-embedding-ada-002 vectorstore: pgvector: index-type: HNSW distance-type: COSINE_DISTANCE datasource: url: jdbc:postgresql://localhost:5432/vectordb github: token: $GITHUB_TOKEN 5. Best Practices & Troubleshooting | Challenge | Solution | |-----------|----------| | Large PDFs > 10MB | Use GitHub's blob API with range requests. | | Rate limiting (GitHub API) | Implement RetryTemplate with exponential backoff. | | PDFs with scanned images | Use TikaDocumentReader with OCR plugin (Tesseract). | | Token limit exceeded | Use TokenTextSplitter with overlap=100 tokens. | | Metadata tracking | Add Document metadata: put("source", pdfUrl) for provenance. | 6. Conclusion The combination of Spring AI (abstractions for LLM workflows), GitHub as a document source , and PDF parsing creates a powerful enterprise knowledge retrieval system. By following the ingestion and query patterns shown here, developers can build secure, context-aware AI applications that leverage existing documentation stored in GitHub repositories. To put this paper itself "in action", the

@Service public class PdfDocumentService public List<Document> parsePdfs(List<byte[]> pdfBytesList) return pdfBytesList.stream() .flatMap(bytes -> ByteArrayInputStream bais = new ByteArrayInputStream(bytes); TikaDocumentReader reader = new TikaDocumentReader(bais); return reader.get().stream(); // Returns List<Document> ) .collect(Collectors.toList());

@RestController public class ChatController private final ChatClient chatClient; private final VectorStore vectorStore; @GetMapping("/ask") public String askAboutGitHubPdfs(@RequestParam String question) // Retrieve relevant PDF chunks List<Document> relevantDocs = vectorStore.similaritySearch(question); // Create system prompt with context String context = relevantDocs.stream() .map(Document::getText) .collect(Collectors.joining("\n---\n")); return chatClient.call(new Prompt( List.of(new SystemMessage("Answer based only on: " + context), new UserMessage(question)) )).getResult().getOutput().getText(); | | PDFs with scanned images | Use

This is an excellent topic, as it sits at the intersection of a popular framework (Spring AI), a specific resource format (PDF), and a vital developer platform (GitHub).